Software Design of Virtual Automatic Weather Station Based on LabVIEW

1 Introduction

The concept of virtual instrument (VI) was proposed by American NI company in the mid-1980s. The so-called virtual instrument is to use the computer as the unified hardware platform of the instrument, make full use of the computer's intelligent functions such as computing, storage, playback, call, display and file management, and at the same time, the traditional instrument professional functions and panel controls are softwareized to make Combined with the computer to form a brand-new instrument system that is completely the same as the traditional hardware instrument in appearance and function, and at the same time fully enjoys the intelligent resources of the computer. Compared with traditional instruments, virtual instruments have many advantages: the processing and calculation of the test volume can be more complicated and the processing speed is faster, the test results are expressed in a richer and more diverse manner, the test data can be conveniently stored and exchanged, the price is low, and the technology Update quickly. This paper introduces a software design method of automatic weather station. It uses LabVIEW8.5 of NI company of USA as the platform and cooperates with QLI50 weather data collector to realize the design of virtual automatic weather station.

2 Function introduction of virtual automatic weather station

The automatic weather station is composed of sensors, data collectors, and data processing terminals. Sensors sense changes in meteorological elements; the data collector can automatically collect and preprocess meteorological elements such as air temperature, humidity, wind direction, wind speed, rainfall, and barometric pressure. The data processing terminal can further calculate and process the data obtained by the data collector. Real-time data is displayed on the screen in the prescribed format, and data can be automatically stored in the prescribed format.

In order to realize the functions of the above-mentioned automatic weather station, the virtual automatic weather station system designed in this paper is mainly composed of four modules: data acquisition, data processing, data display, and data preservation. If there is no special requirement for the data collection cycle, you can connect these four modules through the data stream, that is, each data collection needs to be processed, displayed, and saved before the second round of collection can be started. In this case, due to data analysis The resulting time delay will increase the data collection cycle.

Since automatic weather stations have high requirements on the data collection period, the method based on data flow is obviously not feasible. Therefore, this paper proposes a data collection mode based on queue technology: that is, multiple parallel loops are used to process different tasks, and each loop has an independent thread that does not interfere with each other. Take the data transfer of the data collection cycle and the data processing cycle as an example: the data collection cycle continuously collects data and places the collected data in the queue, and the data processing cycle continuously removes data from the queue for data processing. If the cycle of processing data is greater than the collection cycle, then the newly collected data will be cached in the queue, as long as the queue is not full, the collected data will not be lost. If the data processing cycle is shorter than the collection cycle, then when the queue is empty, the data processing cycle will be in a waiting state, so it will not cause repeated analysis of the data. When the data collection cycle stops, if there is data in the queue, the data analysis cycle will also analyze all the remaining data, so stopping the data collection will not lose the previously collected data. The same is true for the data display cycle and the data storage cycle. Four cycles are performed in parallel to realize the function of an automatic weather station.

In addition, in order to accurately control the time, the system also uses a timing structure and notification technology. Through the notifier operation function, a block diagram can be implemented to maintain a waiting state before receiving the notification message from the timing structure every second, thus achieving The function of displaying data every second and saving data every minute in the program.

3 Data collection

The data collection module is used to obtain the data collected by the QLI50 meteorological data collector. The block diagram of the data acquisition module is shown in Figure 1.

Figure 1 Block diagram of data acquisition program

First use the "open TCP connection" function to open the TCP network connection specified by the address and remote port, and at the same time use the "get queue reference" function to create a queue named "network port data", and then use the "read TCP data" function Read bytes from the TCP network connection and put the bytes in the "network port data" queue, wait for the data processing cycle to read the data in the queue, and start collecting data for the next second.

4 Data processing

The data processing module is used to pre-process the collected data. The block diagram of the data processing module is shown in Figure 2.

Figure 2 Block diagram of data processing

Since the collected raw data is a series of codes, the data of each meteorological element must also be decoded. Data is dequeued from the "network port data" queue. Use the "Preprocessing" subVI to separate the dequeued data and add them to the "process data" queue in sequence through the automatic index function of the FOR loop to wait for the data Display the data in the cyclic read queue, while continuing to read data from the "network port data" queue.

5 Data display

The data display module is used to display real-time data in a prescribed format on the virtual front panel. The block diagram of the data display module is shown in Figure 3.

Figure 3 Data display block diagram program

Each meteorological element data is listed from the "processing data" queue, and the data is transferred to the waveform chart in the main interface block diagram through the global variable "read data once", which can display the change curve of each meteorological element data in real time. In addition, because the front panel shows the average data of each meteorological element for one minute, the data out of the queue also passes a "mean" function, and the average data within one minute is transferred to the main interface through the global variable "minute average data" To display the average value of each meteorological element within one minute. For the purpose of data saving, create a "save data" queue, add the data dequeued by the "process data" queue to the "save data", wait for the data save cycle to read the data in the queue, while continuing to go from the "process data" queue Read the data.

6 Data storage

The data storage module is used to automatically store the collected data in a prescribed format. The block diagram of the data saving module is shown in Figure 4.

Figure 4 Block diagram of data storage

The data saving module uses notification technology. The timer in the main block diagram sends out a notification signal every second. The program writes the data dequeued from the "save data" queue in this minute at the 60th second to the current The time-named text file is saved in the data folder under the current path, so that the data collected every second is saved.

7 Conclusion

This automatic weather station software uses LabVIEW8.5 as the development platform and cooperates with QLI50 weather data collector to realize the basic functions of virtual automatic weather station. The formed virtual automatic weather station is successfully used in ground meteorological observation and has the characteristics of low cost and convenient operation. In addition, several modules of the software have adopted the design of subVIs. You can use LabVIEW remote VI calling technology, that is, calling VIs on another computer through local VIs, and users do not need to consider the complicated details of network communication. Through the remote VI call, the network distributed system can be easily realized, the data collection of the automatic weather station can be realized on the local computer, and the real-time status of the automatic weather station is displayed on another remote computer.

An eye with brown eye liner under the bottom lashes.
Eye liner is commonly used in a daily make-up routine to define the eye or create the look of a wider or smaller eye. Eye liner can be used as a tool to create various looks as well as highlighting different features of the eyes. Eye liner can be placed in various parts of the eye to create different looks with a winged eye liner or tight lined at the waterline. Eye liner can be drawn above upper lashes or below lower lashes or both, even on the water lines of your eyes. Its primary purpose is to make the lashes look lush, but it also draws attention to the eye and can enhance or even change the eye's shape. Eye liner is available in a wide range of hues, from the common black, brown and grey to more adventurous shades such as bright primary colors, pastels, frosty silvers and golds, white and even glitter-flecked colors.

Eyeliner Pencil

Eyeliner Pencil,Liquid Eyeliner,Waterproof Eyeliner,Retractable Waterproof Eyeliner

HENAN BON INDUSTRIAL(COSMETIC) CO.,LTD , https://www.boncosmetic.com