NI LabVIEW contains a comprehensive collection of drag-and-drop controls and indicators so you can quickly and easily create user interfaces for your application and effectively visualize results without integrating third-party components or building views from scratch.
The quick drag-and-drop approach does not come at the expense of flexibility. Power users can customize the built-in controls via the Control Editor and programmatically control user interface (UI) elements to create highly customized user experiences.
Traditional instruments and most software applications typically have fixed user interfaces. The data they present and the controls available for users were defined to cover all of the capabilities of the particular hardware or software and not any one specific use case.
There are two inconveniences associated with this approach:
Every LabVIEW virtual instrument (VI) has a front panel where you, as the developer, can choose to display data or expose controls to your users. If you create a VI with just the appropriate controls and displays for your specific need, you end up getting more accurate results while spending less time setting up measurements and interpreting the measured data.
Any time you acquire, generate, or analyze data, you want to see the data in a way that makes sense.
Figure 1. Create indicators directly from the data you want to display.
LabVIEW can display any acquired or processed data you have on your block diagram, and you do not need to convert anything or write code to create a new indicator. Simply right-click the wire and choose Create»Indicator to add the appropriate display to your front panel. Once you have created it, you can customize colors, units, scale, range, and zoom directly on your front panel.
Unlike most programming languages and environments, LabVIEW is developed with technical use cases in mind, so it offers engineering and scientific displays. You can show temperature using a thermometer, view a digital test vector with a digital waveform graph, and compare time and frequency domain information side by side. If you want to see voltage expressed in engineering units (10 mV rather than .01), you can. If you see something unusual in a waveform and want to take a closer look, you can interactively manipulate the graph by using the zoom tool or clicking the scale and typing new end points.
Whether you are creating a simple data-logging program for the lab or a complex production test system, sometimes you need to create applications for others to use. In these situations, you need to be able to control what the operator can change, limit the potential inputs, and provide feedback.
With LabVIEW, you have full control over what you make visible to your user on the front panel, and which parts of your application you keep to the block diagram source code. Right-click a control to edit properties such as input range, coercion, and tooltips that make your application easier to use and understand.
Figure 2. A Customized LabVIEW Front Panel
Front-panel customizability is not limited to the type of controls or indicators you use. LabVIEW comes with three different customizable control themes. You can use the defaults for the fastest development, make LabVIEW look like any other Windows application, or customize your own controls and color scheme to suit your company branding or personal preferences.
The alternative to using an integrated tool such as LabVIEW is to use a general-purpose programming language and try to integrate or implement the visualization tools you need. Integrating visualization libraries incurs an extra cost and likely requires you to convert data into whatever format that particular library consumes data in. Developing your own visualizations from lower-level graphics tools is a time-consuming and difficult task which inevitably results in underwhelming capabilities.
Another option is to move the data to another application after you have acquired it. Although common, it doesn’t work very well in many cases. Moving data over by hand is an error-prone effort, especially when you have to reformat or massage it when moving it from one tool to another.
Another area where you are often forced to use different tools to create your application logic and your UI or human machine interface (HMI) code is when you are developing headless embedded systems. Many embedded applications are programmed in low-level languages such as C, and they communicate with a host application created in another language. Again, the data must be communicated back and converted into the appropriate data type before it can be displayed. LabVIEW creates debug UIs for code running on headless targets. This makes it easy to communicate data back to host applications running on a PC that can then display the data using LabVIEW controls and indicators.
LabVIEW contains all of the standard OS-defined controls such as number and string displays, buttons, slides, progress bars, and tabs. You have the option of using LabVIEW-styled controls, OS-styled controls, or modifying the style of the controls to meet your needs.
Figure 3. Standard LabVIEW Controls and Indicators
Figure 4. Standard Windows Controls and Indicators
In addition to the standard controls you find in most full-featured programming environments, LabVIEW contains many more controls and indicators common in scientific and engineering applications. Using the included controls, you can create VIs with front panels that resemble familiar physical instruments and are, consequently, easier for operators to understand and use.
Figure 5. Engineering Controls and Indicators
After you acquire or generate data, or if data is readily available in a file or database, you can use a graph or chart to graphically display data.
Graphs and charts differ in the way they display and update data. Graphs display a set of data which is overwritten every time you send new values to the graph. The waveform graph, which displays one or more plots of evenly sampled measurements, plots single-valued functions, as in y = f(x), with points evenly distributed along the x-axis, such as acquired time-varying waveforms. You can add cursors and annotations both interactively and programmatically to highlight important data points.
Figure 6. Waveform Graph with Annotation and Cursor
In contrast, a chart appends new data points to those points already in the display to create a history. On a chart, you can see the current reading or measurement in context with previously acquired data. When more data points are added than can be displayed on the chart, the chart scrolls so that new points are added to the right side of the chart while old points disappear to the left. You usually use a chart with slow processes in which only a few data points per second are added to the plot. The waveform chart is a special type of numeric indicator that displays one or more plots of data typically acquired at a constant rate.
Figure 7. Waveform Chart in Sweep Mode
The XY graph is a general-purpose, Cartesian graphing object that plots multivalued functions such as circular shapes or waveforms with a varying time base. The XY graph displays any set of points, whether or not they are evenly sampled. You also can display Nyquist planes, Nichols planes, S planes, and Z planes on the XY graph.
Figure 8. XY Chart with Multiple Plots
You can use the LabVIEW intensity graph and chart to display 3D data on a 2D plot by placing blocks of color on a Cartesian plane. For example, you can use an intensity graph or chart to display patterned data, such as temperature patterns and terrain, where the magnitude represents altitude.
Figure 9. Intensity Chart Plot of a Wave Interference Pattern
LabVIEW also offers the digital waveform graph to display digital data, similar to timing diagrams or logic analyzer displays. The digital waveform graph accepts the digital waveform data type, the Boolean data type, and an array of those data types as inputs. By default, the digital waveform graph displays data as digital lines and buses in the plot area. You can customize the digital waveform graph to display digital buses, digital lines, or a combination of both.
Figure 10. Digital Waveform Graph
The mixed-signal graph, which can display both analog and digital data, works with all data types accepted by waveform, XY, and digital waveform graphs. A mixed-signal graph may have multiple plot areas. A given plot area can display only digital or analog plots, not both. The plot area is where LabVIEW draws the data on the graph. The mixed-signal graph automatically creates plot areas to accommodate analog and digital data. When you add multiple plot areas to a mixed-signal graph, each plot area has its own y-scale. All of the plot areas share a common x-scale, meaning you can compare multiple digital and analog data signals.
Figure 11. 3D Surface Graph
3D graphs are included in the LabVIEW Full and Professional Development Systems. These are useful for many real-world data sets, such as temperature distribution on a surface or a joint time-frequency analysis, where you need to visualize data in three dimensions. With the 3D graphs, you can visualize 3D data and alter the way that data appears by modifying the 3D graph properties.
Figure 12. Picture Control Showing the Current Position of a Robotic Arm
When you have custom display needs, the picture control and 3D picture control give you blank canvases on which you can draw whatever visualizations you require. Picture controls are especially useful when working with control applications or device testing, where being able to see the device you are controlling or testing makes the data more meaningful and immediately actionable. You can also map sensor data directly to an existing 3D model.
Figure 13. Front Panel with a 3D Picture Control Showing a Helicopter Simulator
A LabVIEW front panel can also display decorations and static images to aid organization, explanation, or branding by importing common file types such as PNG, JPG, BMP, and GIF.
Some LabVIEW add-ons extend visualization capabilities by providing components for more specific use cases.
For control design and similar applications, common plots such as zero pole, root locus, Nichols, Bode, and Nyquist are available in the LabVIEW Control Design and Simulation Module.
Figure 14. Bode Plot from the LabVIEW Control Design and Simulation Module
You use the control design indicators to display Nichols, Nyquist, pole-zero mapping, and root-locus plots. With the indicators on the CD Plot palette, you can display these plots on the front panel of a VI you create. You can also create these indicators from the block diagram by using the CD Nichols VI, the CD Nyquist VI, the CD Pole-Zero Map VI, and the CD Root Locus with Gain VI.
Figure 15. Root-Locus Plot from the LabVIEW Control Design and Simulation Module
The NI Vision Development Module for LabVIEW for image processing applications features several visualization tools, including the capability to display and analyze pictures, images, and video in real time or offline (in .JPG, .PNG, and .TIFF files), using analog and digital, color or black-and-white cameras. You can display and analyze images from infrared cameras in real time.
Figure 16. Matrix Code, Infrared, Color, and Grayscale Images in the NI Vision Development Module for LabVIEW
For example, using the Vision Development Module, you can capture images directly from a standard microscope or an atomic force microscope and make measurements directly on the image.
In Figure 17, the Vision Development Module detects edges between nanotubes (100 µm scale) and measures the distance between them.
Figure 17. Edge Detection on Aligned Nanotubes
In the LabVIEW Datalogging and Supervisory Control Module, you can take advantage of an extensive collection of graphic symbols and objects to create process-monitoring and control-oriented applications, such as supervisory control and data acquisition (SCADA) systems and operator interfaces.
Figure 18. The LabVIEW Datalogging and Supervisory Control Module Image Navigator
With the Control Editor, you can import custom imagery, colors, and fonts into LabVIEW controls and indicators and save your creations for reuse. Customized controls have the same functionality as built-in controls, but can look as different as you care to make them. You can also create strict type definitions to make changes to a custom control once and have your changes propagate to every VI that uses that control.
Figure 19. Customize Existing Controls with the Control Editor
An XControl is an advanced LabVIEW feature with which you can embed multiple regular controls and associated logic into a new, user-created control. This lets you embed behaviors such as converting units and filtering tables, and merge multiple dependent controls into a single reusable control.
Because LabVIEW is an open environment, you have many options for expanding beyond the included controls. ActiveX and .NET controls can be hosted on the LabVIEW front panel and controlled from the block diagram. You might use this capability to embed Web pages and videos into your UI.
Figure 20. Embedded Web Browser and Windows Media Player Controls
You can also use non-LabVIEW visualization tools from your block diagram by using ActiveX or calling into DLLs or executables. Because LabVIEW can call almost anything, you are free to use lower-level visualization libraries such as OpenGL or Direct3D.
LabVIEW data visualization and UI capabilities give you all the tools you need to quickly display data and provide intuitive ways to interact with your custom logic. Built-in controls work seamlessly with acquired data so you do not waste time converting and massaging data into new formats purely for display. When you want more than the default look and feel, LabVIEW is customizable and extensible – which means you can define appearance and behaviors.