Three Steps to Save Three Weeks with LabVIEW – Automating Report Generation

Publish Date: Sep 28, 2012 | 3 Ratings | 4.00 out of 5 | Print | Submit your review

Table of Contents

  1. USB Bandwidth Increases with Windows 7
  2. DIAdem and CompactRIO Go to Hollywood

To engineers, “report” is a dreaded word synonymous with “wasted time.”

Although the IEEE 829 standard on software test documentation refers to the acronym TPS as “test procedure specification,” many engineers commonly refer to it as “totally pointless stuff.” Ironically, the delivery of a report often signifies the completion of a milestone or project, meaning the job is not finished until a report is completed and handoff occurs. Engineers have been successfully automating tests and processes with NI LabVIEW software for more than 20 years, but few automate the reporting task.

A key reason engineers struggle to automate reporting is that they lack the right tool for the job. Microsoft Excel is the main tool engineers attempt to use for reporting for two reasons: familiarity and accessibility. Many people use Excel for basic finance management in their personal lives; surely, it can be used to display time-domain waveforms and frequency harmonics of vibrating physical structures, each channel containing multiple millions of samples. Right? Too often, this perception intensifies frustration with reports more than attempting to complete a report in the first place.

Engineers struggle when using Excel for automated reporting primarily because the environment is not designed to work with the data-intensive demands of their applications, such as sophisticated algorithm computations, large data set handling, and complex visualizations. Alternatively, engineers can select an engineering software program such as NI DIAdem, which is designed to simplify postprocessing and off-line reporting of engineering data. Then, they can use LabVIEW, the same tool used to automate the capture and analysis, to save significant time by automating reporting in three steps.

1. Create a Report Template

All reports have at least one thing in common: a starting template. Before even thinking about delivering a polished report, engineers must ensure a report template is set up to easily plug in new test data as they acquire it. A report template provides guidance on which information to include and how the report should basically look. DIAdem offers an intuitive report design interface in which engineers can create multipage reports containing 2D and 3D graphs and tables, data properties, images, graphics, text, and decorations. Figure 1 shows an example of a report template created with DIAdem.

After designing the look of the report, engineers need to define which data to represent in the graphs and text fields. To do this, they can drag and drop the data of interest onto the object in the report template. For instance, to display 30 temperature measurement channels on a graph, engineers select all 30 channels in the DIAdem Data Portal and drag them onto the graph in the report. This step binds the references or names of the channels, for instance TempSensor[0..29], as the input for the graph’s display. In the future, any new data written to file as TempSensor[0..29] dynamically displays on the graph.

Figure 1. Engineers can create report templates using the drag-and-drop report editor within DIAdem.

2. Push Data to the Report Template

Assuming a LabVIEW application that acquires and writes data to a file already exists, the basic elements of automating report generation are now available: the LabVIEW application to acquire data and the DIAdem report template. The next step is to dynamically load the LabVIEW data into the DIAdem report. Engineers can apply the LabVIEW DIAdem Connectivity VIs to accomplish this step.

The LabVIEW DIAdem Connectivity VIs provide a LabVIEW palette of VIs to easily exchange data with DIAdem and completely automate the DIAdem environment via ActiveX. Engineers can download the VIs for free at This step can be as simple as four VIs, or flexible enough to scale with automation demands. Figure 2 shows the four VIs used to (1) load the application reference to DIAdem, (2) load data from a file into DIAdem, (3) load the report template, and (4) close the DIAdem reference.

‘‘  We use LabVIEW and DIAdem to generate weekly laboratory statistical process control reports to monitor the health of our lab test stations. Before DIAdem, this would take most of Monday morning every week. With DIAdem, we can have the reports in the lab manager’s e-mail before he gets in, saving more than three weeks of engineering time in a year. ’’

– Joe Gerhardstein, Principal Engineer, Sirius XM Radio

3. Publish the Report

Automated reporting is now one step away from completion. Publishing the report can be as simple as using another VI from the LabVIEW DIAdem Connectivity palette. By placing the DIAdem Report Print VI in line with the code in Figure 2, the report is automatically printed when called. Alternatively, DIAdem includes functionality to automatically convert the DIAdem report to PDF or HTML. Engineers can manually enact this step by selecting Export to PDF/HTML from the DIAdem REPORT file menu. However, to automate this step, engineers can use DIAdem SCRIPT to programmatically call the Convert to PDF/HTML option with a single function and use the DIAdem Run Script VI to automate script execution from LabVIEW. The LabVIEW application can scale even further to automatically e-mail the PDF file to a manager or automatically publish the HTML file to the Web.

Figure 2. Engineers can automate DIAdem report generation with the LabVIEW DIAdem Connectivity VIs.

Save Three Weeks with Automated Reporting

As much as engineers try to avoid generating reports, it is an inevitable part of the job. Automating report generation with LabVIEW and DIAdem provides the ideal user experience for simplifying this tedious process. By following three simple steps, engineers can save the days or weeks it takes to prepare, generate, and deliver reports. So the next time someone asks for a TPS report, engineers can have LabVIEW e-mail it.

Jared Aho 

Jared Aho is the test software group manager at National Instruments. He holds a bachelor’s degree in electrical engineering from the University of Michigan, Ann Arbor.

Download LabVIEW example code and an evaluation version of DIAdem to automate reporting.

1. USB Bandwidth Increases with Windows 7

Recent benchmarks performed in the NI design labs showed that USB throughput increased between 5 and 30 percent when running on Microsoft Windows 7, compared to the same system running on Windows XP. The USB stack optimization in the Windows 7 OS helps advanced USB devices, such as the new NI CompactDAQ chassis (page 11), stream more data back to the PC.

View a video on these benchmarks.

Back to Top

2. DIAdem and CompactRIO Go to Hollywood

On November 25, 2009, NI DIAdem software and CompactRIO hardware made cameo appearances on the popular scientific television show, MythBusters. On a recent post from the Sweet Apps blog, check out how Adam and Jamie used NI products to help determine if it is possible to survive a two-story leap into a dumpster.

Read the post and see DIAdem and CompactRIO on MythBusters.

This article first appeared in the Q1 2010 issue of Instrumentation Newsletter.

Back to Top

Bookmark & Share


Rate this document

Answered Your Question?
Yes No