Share this

Development of Comprehensive Report Generation Technology in LabVIEW

2026-04-06 05:12:48 · · #1
Abstract: Report generation is an important component of a complete virtual instrument testing system. This paper compares two report generation methods and their characteristics under the LabVIEW platform. It focuses on the data communication between LabVIEW and Excel, and adds audible alarm and automatic printing functions, improving data reliability and security. Keywords: Virtual instrument testing system; Report generation; Spreadsheet software [b][align=center]The Development of Complicated Report Generation Technology in LabVIEW ZHANG Pei JIANG Ying XU Wei-ming ZUO Xiao-wu[/align] [/b] Currently, several software programs used for generating reports include Visual Basic and Matlab Report Generator. LabVIEW is a virtual instrument software development tool based on G language launched by NI. Using LabVIEW, a virtual instrument system can be easily generated to complete tasks such as signal acquisition and data processing to form a complete test system. LabVIEW itself has powerful report generation functions and can communicate with various applications, making it the preferred tool in report generation technology. It is currently widely used in the later data processing of test systems. Based on summarizing the report generation functions developed by predecessors, the author added some new functions to improve the entire test system. 2 Improvement of report generation function The report generation methods can be done in the following ways [1]: directly using NI's Report Generation Toolkit to generate reports; using File I/O class functions to generate reports; using Report Generation class functions to generate reports; using Excel to generate reports. However, since the Report Generation Toolkit module is not integrated into LabVIEW, it must be purchased separately, which is not cost-effective; the reports generated by File I/O class functions have poor readability and simple style, so the latter two methods are generally used at present. 2.1 Using Report Generation Class Functions to Generate Reports This method can print reports with complex formats and is easy to operate. The Report Generation sub-template in LabVIEW provides a wealth of functions [2]. From generating a new report, setting the report margins, orientation, header text, adding text, pictures and tables to the report, to printing the report, there are full help files for developers to use. Taking the product inspection report as an example, the report generation program is shown in Figure 1. [align=center] Figure 1 Block diagram of generating reports using Report Generation class functions[/align] As shown in the figure, curves, data, tables, etc. are added to the report, and finally the report is printed directly in the LabVIEW main program through a Case statement. The front panel is shown in Figure 2. It should be noted that since the report can only print the data values ​​at an instant, the print icon button should not be in a closed state for a long time. Here, Mechanical Action is set to Latch when pressed. [align=center] Figure 2 Front panel of generating reports using Report Generation class functions[/align] Although this method is easy to operate, it also has some shortcomings. For example, it struggles with complex data; in actual testing systems, the number of measurement points often reaches hundreds, and setting up large amounts of data in the LabVIEW front panel is impractical; although printing functionality is implemented, the printing effect does not conform to the traditional concept of reports, and data portability is low. Therefore, it is proposed to generate reports using Excel. 2.2 Generating Reports Using Excel Microsoft Excel is a powerful data processing software with extremely wide applications. By combining it with LabVIEW, the collected data can be transferred to Excel, fully utilizing the functions of both. Excel itself contains a large number of templates, allowing users to pre-customize templates to determine the report format. Through the communication protocol between the two applications, reports are generated using DDE and ActiveX methods. Then, voice effects, printing functions, data saving, and other functions are added to the program to further improve the report's additional functions. The following uses a report program for a boiler heating automatic control system as an example to introduce a fully functional report generation system. [align=center] Figure 3 Report Generation Front Panel[/align] First, the main interface of the report is shown in Figure 3. Users can set the path for report generation, i.e., the generation of the Excel file, and fill in the required parameters in the report name, start time, and end time fields. The left side shows the names of various measurement indicators, which users can modify as needed. Redundancy items are also set. The number of indicators to be measured is selected in the lower right corner, and the main interface can automatically expand the indicator items for users to add. Secondly, if the user needs to print the front panel, they can press the print front panel button. The lower right corner of the interface has instructions for use, which facilitates communication between developers and users. Some program flowcharts are shown in Figures 4 and 5. [align=center] Figure 4 Setting path and table name[/align] [align=center] Figure 5 Sending data to Excel[/align] Since LabVIEW provides an automatic printing function, to print the curve in the front panel, it is only necessary to make the object to be printed into a sub-VI. When the program calls the sub-VI, the printing function is implemented[3]. The main program flowchart is shown in Figure 6. The key point of this method is that the main program needs to pass the upper and lower limits of the curve coordinates to the sub-VI, which is achieved through the attribute node, as shown in the figure. [align=center] Figure 6 Automatic printing main program flowchart[/align] Finally, a sound alarm function is added to the system[4]. Online monitoring systems generally require alarm functions. This is achieved by pre-recording a sound in the program. When unexpected errors occur during report generation, it can promptly alert staff to prevent accidents caused by data errors, which is essential in industrial monitoring. We will use the sound function in LabVIEW to record the sound, as shown in Figure 7. [align=center] Figure 7 Recording Sound[/align] In the SI CONFIG function, you can choose stereo or single-channel. Then, we use the generated file as the sound file, which serves as the source file for error alarms, as shown in Figure 8. [align=center] Figure 8 Playing Sound[/align] 3 Conclusion and Application This concludes the introduction of a complete and fully functional report generation system. It has been tested in an automotive thermal performance testing system, greatly reducing the data recording burden on staff while improving safety and reliability. In terms of data chart printing, it truly achieves "what you see is what you get." The author's innovation is that the system integrates various functions such as real-time printing of data and charts, and develops a complete report generation system. It is easy to operate and has strong data portability, which is better than the report generation system currently in use. At the same time, an alarm function is added to the program design, which provides a guarantee for the safety and reliability of the work site. References [1] Yang Leping et al. Advanced LabVIEW Programming. Beijing: Tsinghua University Press, 2003. [2] Shi Boqiang et al. Practical Tutorial on LabVIEW Programming Technology. Beijing: China Railway Publishing House, 2002. [3] Zhao Hailong. Adding automatic printing function to objects in LabVIEW [J]. Microcomputer Information, 2001, 17 (12): 32-34. [4] Lei Zhenshan. Practical Tutorial on LabVIEW7 Express. Beijing: China Railway Publishing House, 2005.
Read next

CATDOLL 135CM Nanako (TPE Body with Hard Silicone Head)

Height: 135cm Weight: 24.5kg Shoulder Width: 33cm Bust/Waist/Hip: 62/57/69cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22
CATDOLL Katya Hard Silicone Head

CATDOLL Katya Hard Silicone Head

Articles
2026-02-22
CATDOLL Jo Soft Silicone Head

CATDOLL Jo Soft Silicone Head

Articles
2026-02-22
CATDOLL 136CM Ya

CATDOLL 136CM Ya

Articles
2026-02-22