Share this

Software Design of a Virtual Signal Analyzer Based on LabVIEW

2026-04-06 07:36:46 · · #1
Abstract: This paper introduces a method for implementing the basic functions of a virtual signal analyzer using LabVIEW 6.1 and an NI 6024E acquisition card. It focuses on the programming methods, block diagrams, and key technologies for waveform acquisition, waveform storage, and waveform reading. The system designed in this paper implements the basic functions of a signal analyzer and has been successfully used in teaching experiments. It features low cost and ease of operation. Keywords: Virtual instrument; LabVIEW; Data acquisition; Waveform storage; Waveform reading 1 Introduction The concept of virtual instrument (VI) represents a revolution in the field of measurement and control technology. Virtual instruments are favored by many users due to their ability to leverage the powerful computing and processing capabilities of PCs, their user-defined and expandable functions, and their low cost. Currently, virtual instruments are gradually entering university laboratories and beginning to serve experimental teaching and scientific research. This paper introduces a software design method for a virtual signal analyzer, using LabVIEW 6.1 from NI (National Instruments) as the development platform and the NI 6024E acquisition card to implement the design of a virtual signal analyzer. 2. Introduction to the Functions of the Analyzer A signal analyzer is an instrument used to measure, display, store waveforms, and perform time-domain and frequency-domain analysis on electrical signals. The virtual signal analyzer mainly consists of five modules: parameter setting, function selection, signal one, signal two, and cross-correlation analysis. (1) Parameter setting module. Completes channel configuration, sets the scan rate, scan number, and buffer size. (2) Function selection module. Enables waveform display, waveform storage, reading waveform data, updating signals, and exiting. (3) Signal one. Corresponds to acquisition channel one, and can perform filtering and windowing, autocorrelation analysis, autopower spectrum analysis, statistical analysis, and amplitude analysis. (4) Signal two. Corresponds to acquisition channel two, with similar functions to signal one. (5) Cross-correlation analysis. Performs cross-correlation analysis and power spectrum analysis on signal one and signal two. When the program runs, the number of channels for data acquisition is controlled by inputting the channel number into the channel control, and the scan number, scan rate, and buffer size are configured at the same time. After configuration, click "Waveform Acquisition" to observe the specific waveform of the signal. If it does not meet the requirements, the parameters can be reconfigured. Once the waveform to be acquired meets the requirements, click "Waveform Storage" to save the waveform data to the specified file. Click "Read Waveform Data" to read the data previously stored in the file and send the corresponding signals to Signal 1 and Signal 2. At this time, click "Filtering and Windowing" to perform filtering and windowing functions on the signal, and output the processed data to the correlation analysis unit for correlation analysis of the output signal. 3 Waveform Acquisition The waveform acquisition block diagram program is shown in Figure 1. The sub-functions used in the block diagram program are as follows. [align=center] Figure 1 Waveform Acquisition Block Diagram Program[/align] AI Config VI: Sets various parameters before sampling. DAQ Occurrence Config VI: Sets a data acquisition event. AI Start VI: Specifies the parameters used to start acquisition in the program, such as setting the number of scans, sampling rate, etc. AI Read VI: Sets the parameters for reading data from the sampling buffer, such as setting the number of reads each time. Clear VI: Deprecates the task ID, thereby releasing the memory buffer and other resources used for sampling. Simple Error Handler VI: Notifies the user of error messages. Wait On Occurrence VI: Handles event waiting. In the waveform acquisition program, the above functions are used to combine the data stream and then perform some necessary processing. The first DAQ Occurrence Config VI sets a data acquisition event. In the While loop, the Wait On Occurrence function sleeps in the background, effectively setting the While loop to a sleep state. After the set data acquisition event occurs, that is, after acquiring the pre-specified amount of data, LabVIEW notifies the Wait On Occurrence function to stop waiting. Since the timeout output parameter of the Wait On Occurrence function is connected to the selection port of the selection structure containing the AI ​​Read VI, the AI ​​Read VI will only be used after the Wait On Occurrence function stops waiting. 4 Waveform Storage [align=center] Figure 2 Waveform Storage Block Diagram Program[/align] The waveform storage block diagram program is shown in Figure 2. The sub-functions used in the flowchart program are as follows: Open/Create/Replace File VI: Indicates that the data is stored in a file with the .BIN (binary) suffix. AI Config VI: Sets various parameters before sampling. AI Start VI: Specifies the parameters used to start acquisition in the program, such as setting the number of scans and the sampling rate. AI Read VI: Sets the parameters for reading data from the sampling buffer, such as setting the number of data points read each time. AI Clear VI: Invalidates the task ID, thereby releasing the memory buffer and other resources used for sampling. Simple Error Handler VI: Informs the user of error messages. Date and Time Sub-VI: Displays the specific time and date when the data was stored. Match Pattern VI: Divides the input string into three parts, such as year, month, and day. Scan Form String VI: Converts the input string into a string of the relevant format. Concatenate String VI: Outputs the input string in an array. Format Date/Time String: Outputs the input time and date strings in the specified format. Replace Array Subset VI: Replaces the data in the array pointed to by the index with other data. Search 1D Array VI: Searches for the specified element starting from the first number of the one-dimensional array. Seconds To Date/Time: Outputs the year, month, day, hour, and second. Configuration Header File Sub-VI: Combines the date, time, and channel number configurations displayed in the Date/Time sub-VI and outputs them as a string. Write Header File Sub-VI: Stores the string output by the Configuration Header File sub-VI as a header file into the specified file. Write File is located in the Functions>>File I/O sub-template. It uses the dup refnum (file identifier) ​​function in the Open/Create/Replace File function to store the string output by the Configuration Header File sub-VI as a header file into the specified file. The flowchart for the Write Waveform Data VI is shown in Figure 3. [align=center] Figure 3 Flowchart for Writing Waveform Data[/align] Write File is located in the Functions>>File I/O sub-template. This function uses the dup refnum function in the Write Header File sub-VI to store the acquired data in binary form into the specified file. Simultaneously outputs dup refnum, error message, and the number of bytes written to the file. The close file function is used to close the file and output related error messages. The above functions and sub-VIs are called in the waveform storage program, combined according to the data stream, and then processed as necessary. 5. Waveform Reading The waveform reading block diagram is shown in Figure 4. [align=center] Figure 4 Waveform Reading Block Diagram[/align] Open/Create/Replace File VI: Used to indicate that the data is stored in the file with the .BIN extension. Simple Error Handler VI: Informs the user of error messages. Read Header File Sub-VI: Used to read the contents of the file. The program reads the contents of the specified file using dup refnum from the Open/Create/Replace File VI, and outputs the relevant content from the file, such as time and date, in string format; mark after read indicates the number of bytes read; simultaneously outputs dup refnum and error message. Display Header File Sub-VI: Displays the relevant information output by the read header file sub-VI, such as time, date, and channel information, on the front panel of the waveform reader. Its block diagram is shown in Figure 5. [align=center] Figure 5 shows the header file flowchart[/align] AI Hardware Config VI: Converts binary data into readable voltage values ​​for plotting. Type Cast VI: This function converts output data into specified data. Search/Split String: Decomposes the output string into two substrings. Read Waveform Data SubVI: Reads waveform data from a file and outputs it to the front panel display of the waveform reader. Read File: Reads binary data from a file using the preceding dup refnum function and outputs the data as a 16-bit integer in a two-dimensional array, while also outputting the file's dup refnum, error messages, and the number of bytes read. 6 Conclusion This virtual signal analyzer software, developed using LabVIEW 6.1 and equipped with an NI6024E acquisition card, implements the basic functions of a signal analyzer. The constructed signal analyzer has been successfully used in teaching experiments, featuring low cost and ease of operation. References: [1] Yang Leping et al. LabVIEW Programming and Application. Electronic Industry Press, 2001. [2] LabVIEW Advanced Tutorial Training Material. Beijing Zhongke Panhua Measurement and Control Technology Co., Ltd. [3] Li Gang et al. LabVIEW—Easy-to-Learn and Easy-to-Use Computer Graphical Programming Language. Beijing University of Aeronautics and Astronautics Press, 2001. [4] Gary W. Jhonson, Richard, USA: National Instruments Corporation, 2000. [5] Liu Junhua. Virtual Instrument Design Based on LabVIEW. Electronic Industry Press, 2003. [6] Yuan Yuan, Gu Jun. LabVIEW Programming and Application. University of Electronic Science and Technology of China Press, 2000.
Read next

CATDOLL Nanako 109CM TPE (Soft Silicone Head with Pale Tone)

Height: 109cm Weight: 15.6kg Shoulder Width: 26cm Bust/Waist/Hip: 52/50/57cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm An...

Articles 2026-02-22
CATDOLL Dora Hybrid Silicone Head

CATDOLL Dora Hybrid Silicone Head

Articles
2026-02-22
CATDOLL 108CM Bebe

CATDOLL 108CM Bebe

Articles
2026-02-22