Design of remote monitoring system for tobacco fields based on virtual instrument technology

Publisher:Radiant777Latest update time:2010-07-07 Source: 赵云丽 王璐 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0Introduction

At present, automation, intelligence, networking and digitization have become one of the main directions of agricultural development. Virtual instrument technology has emerged to meet the development requirements of this modern agriculture. The ecological environment of agriculture has an extremely important impact on the growth and development of tobacco leaves, the implementation of cultivation technology, and the prevention of pests and diseases. The growth and development of tobacco leaves are closely related to factors such as light intensity, temperature, and humidity. Therefore, in today's agricultural economy that highlights "diversification", "quality" and "efficiency", simply relying on human experience to monitor the environment is particularly inadequate. Moreover, traditional data acquisition methods are time-consuming and labor-intensive, easily interfered by the outside world, and have low accuracy. This design attempts to use virtual instrument technology based on the LabVIEW (Laboratory Virtual Instrument Engineering Workbench, Laboratory Virtual Instrument Integrated Environment) development platform to collect and store real-time data on the ecological environment of the fruit orchard.

1 System overall design

The construction plan of the tobacco field ecological environment system adopts a PC-DAQ (computer-based data acquisition card) system, which is composed of sensors, signal conditioning devices, data acquisition cards, actuators and other equipment.

This monitoring system uses the multi-way switch of the data acquisition card to complete the switching between the hardware data channels, so as to achieve the purpose of real-time collection and measurement of climate factors such as temperature, humidity, and light for tobacco leaf growth by a computer and a data acquisition card. After the collected tobacco field ecological environment data is analyzed and processed, it is displayed in real time and statically on the front panel (daily average historical data), and then stored for future query and use. In addition, the system also adds a network transmission function, which allows users to open and operate the front panel of the VI on the remote server computer on the local computer.

2 System Hardware Composition

Figure 1 is the hardware block diagram of the tobacco field ecological environment monitoring system. The system mainly completes the data collection of the ecological environment. The data acquisition system is generally composed of data acquisition hardware, hardware driver, data acquisition function and application program. Its basic task is to generate and measure physical signals.

The hardware equipment of this monitoring system mainly consists of temperature sensors, humidity sensors, light sensors, data acquisition cards and computers. First, the temperature and humidity sensors and light sensors convert the temperature and humidity signals and light signals into electrical signals, which are then transmitted to the computer after AD conversion by the data acquisition card. Finally, the computer analyzes and processes the collected data and stores and displays them.

The selection of hardware should follow the principles of practicality, standardization and durability. In terms of sensor selection, you can use the LT/W/S outdoor temperature and humidity sensor, whose temperature range is -20 to 80°C and humidity range is 0 to 100%; the LT/G light sensor, whose light intensity measurement range is 0 to 200,000 lux.

This system uses the data acquisition card PCI-6024 of NI. This card is based on the PCI bus and supports unipolar and bipolar analog signal inputs. The signal input ranges are -5 to +5 V and 0 to 10 V respectively. It can provide 16 single-ended/8 differential analog input channels, 2 independent D/A output channels, 24-line TTL digital I/O channels, 3 16-bit timer counters and other functions. The communication between the system software and the data acquisition card can be completed by simply setting up the Measurement Automation software provided by NI. [page]

3. Software design of tobacco field monitoring system

The software part of this system is designed based on the LabVIEW7 Express application platform. According to the modular idea, the system is designed into four modules: data acquisition, real-time data display, data storage and network transmission. Each module can be written into a VI according to its function and can be called separately through the main control module. The software system structure diagram is shown in Figure 2.

3.1 Main control module

The main control module can coordinate the work and communicate with each other according to the framework protocol of the system, and can realize human-computer interaction. At the same time, the main control module also provides a user interface, through which the user can issue instructions, and the main control module dispatches each functional module according to the instructions. The realistic instrument soft panel provided by this system makes it extremely convenient for users to use.

3.2 Data Acquisition Module

The data acquisition module mainly completes the digital signal conversion of temperature signal and light signal and transmits it to the computer. The data acquisition function of NI's data acquisition card can be realized by combining the intermediate input functions in the input module provided by LabVIEW.

Figure 3 is a flowchart of the data acquisition program designed using intermediate analog input. First, use the Device Open.vi module to open the data acquisition device; then use the AI ​​Config.vi module to configure the data acquisition card, select the analog input channel, and specify the range of the input signal to adjust the hardware gain, while setting the size of the computer buffer occupied by the acquired data and setting the scanning interval; then start the analog input operation through AI Start.vi, which is mainly used to control the data acquisition rate and the number of scans to be obtained. Here, the Number of scans to acquire (the number of scans to acquire) input port value is set to "0", that is, the continuous acquisition mode is selected until the analog input operation is cleared (if it is set to "-1", the scan will stop as long as the buffer is full); then read the data from the buffer allocated by AI Config through AI Read.vi, which can control the number of points read each time, the position of the read data in the buffer, etc. The output is a two-dimensional array, and each column of data corresponds to a channel in the channel list; finally, clear the analog operation, clear the buffer allocated in the computer, and release all data acquisition resources through the AI ​​Clear.vi module.

[page]

3.3 Real-time display module

In the real-time data display module, the three sets of data collected by the acquisition card are separated and processed, and then connected to three WaveformCharts respectively. The temperature, humidity and illuminance curves are displayed in three different colors in the Chart graphic display on the front panel. The refresh mode is the default Scroll, and Show DigitalDisplays is set. The three Boolean indicators show whether the three channels are running. When the indicator is on, it means that data acquisition is in progress. At the same time, the current data acquisition time is also displayed on the front panel.

There are three subVIs in the data storage: read and calculate the average subVI, text header subVI and table header subVI. The system uses a flat sequence structure to execute the entire data storage process. First, set a certain trigger time in the program (input by the user on the front panel, the format is H:M, such as 19:00 means 7 o'clock in the evening), then calculate the average of the tobacco field ecological environment data collected in one day, and save this average. At the same time, the average value curve of the recent days is displayed on the front panel. During the trigger time operation, the collected and saved text file is first processed, the average value is read and calculated, and then the average value is saved in two formats: when saved as a spreadsheet file (.xls), the resulting table is similar to a report; when saved as a text file (.txt), a file including the corresponding time information and data is obtained.

3.4 Data Access Module

The data access module mainly stores the processed temperature and humidity values ​​into the specified file by calling WriteCharacters To File.VI in LabVIEW. It mainly uses the block diagram program of the data storage module to obtain the system date and time function and write data to the file.

The file must be read in the format in which the data is saved. Because the original data is saved in ASCII format and uses the string data type, a file I/O function must be used to read the data as a string. The main functions used are Read Characters From File.vi (read string data from a file) and Extract Numbers.vi (extract non-numeric symbols and convert them into numeric values).

3.5 Network transmission module

This system utilizes the remote panel technology of LabVIEW. Users can open and operate the front panel of the VI located on the remote (Web Server) computer directly on the local (Client) computer in an extremely simple way. They can even embed the LabVIEW front panel window into a web page and operate it directly on the web page.

Using Remote Panel in LabVIEW requires completing two steps: starting the LabVIEW Web Server service on the LabVIEW Web Server computer and connecting and running the Remote Panel on the Client computer.

This system uses the method of directly operating the Remote Panel in the LabVIEW environment to complete the work of this module. Before using the Remote Panel on the client side, first run LabVIEW on the server computer and configure the Web Server to complete the settings of the file path and network, the client access rights and the VIs access rights. After that, you can run a Remote Panel in the LabVIEW environment on the client side. The specific steps are as follows:

(1) Open the front panel of the VI to be run remotely on the Web Server.

(2) Select Operate→Connect to Remote Panel from the menu bar in the LabVIEW environment on the client side. The Connect to Remote Panel dialog box pops up. Enter the IP address, the name of the VI to be opened, and the port number.

(3) Click the Connect button to connect. When the connection is successful, the Remote Panel will appear on the screen. After that, you can perform operations and controls on the front panel of the Client. However, it should be noted that the front panel of the Client is different from the front panel of the Web Server.

4 Conclusion

This system is based on LabVIEW7 Express functional software, and uses a computer and a data acquisition card to monitor the ecological environment of tobacco fields. The development and application of this system has greatly overcome the shortcomings of the traditional single-chip monitoring system, such as complex hardware structure and cumbersome software programming, improved measurement accuracy, and realized remote data transmission and monitoring.

Reference address:Design of remote monitoring system for tobacco fields based on virtual instrument technology

Previous article:Reliability Analysis Using SAS Six Sigma Software JMP
Next article:An integrated test platform for automotive electronics based on virtual instruments

Recommended ReadingLatest update time:2024-11-16 21:27

Energy Storage Potentiostat Based on LabVIEW Software and PXI Instruments
Challenge: Develop a potentiostat/galvanostat/impedance analyzer system (potentiostat system) with easy-to-use software, user-friendly interface, high accuracy and resolution, multi-frequency mode, low current option, and email/text notification capabilities Solution: Use a potentiostat based on
[Analog Electronics]
LabVIEW - Arrays
Arrays An array is a collection of data elements of the same type that can be of a variable size. Like other languages, Labview also provides an array structure, which is a collection of elements of the same data type, such as array, Boolean, string, etc. When you need to plot a batch of data frequently, using arrays
[Test Measurement]
LabVIEW - Arrays
Labview implements single sideband signal modulation (SSB) [phase shift method]
The expression in the time domain is The modulator model is In this experiment, more phase shifts are required because a total of four signal simulators are used, one is a modulation signal without shift, one is a modulation signal with shift, one is a carrier signal without shift, and one is a carrier signa
[Test Measurement]
Labview implements single sideband signal modulation (SSB) [phase shift method]
LabVIEW Data Operations Palette
  The Data Operations sub-palette is shown in Figure 1, where the nodes are used to change the data type in LabVIEW.   Figure 1 Data Operation Sub-Panel   The nodes and their functions in the Data Operations sub-palette are shown in Table 1.   Table 1 Nodes and their functions in the Data Operations sub-pale
[Test Measurement]
LabVIEW Data Operations Palette
Get the Hard Drive Serial Number via LabVIEW
There are many posts of this kind, but almost all of them are implemented by calling dynamic link libraries. To be precise, the work of obtaining the hard disk serial number is implemented by DLL written in other languages. In today's example, I don't need to call dynamic link libraries, but directly use LabVIEW to obt
[Test Measurement]
Differences between references, property nodes, and local variables in Labview
        In Labview, we often encounter several concepts, namely, control references, property nodes, and local variables. What are the differences between them?         First, let's talk about references. In Labview, they are called reference handles. In Windows programming, reference handles refer to pointers to poin
[Test Measurement]
Design of RFID Reader Based on LabVIEW
0 Preface Radio Frequency Identification (RFID) is a technology that uses the spatial coupling and backscattering characteristics of radio frequency signals to automatically identify target objects and exchange data. Therefore, the identification process does not require human intervention and has the characteristic
[Test Measurement]
Design of RFID Reader Based on LabVIEW
LabVIEW Design Pattern Series - Shift Register
standard: 1. Too many shift registers will lead to too many wires, which looks messy. Use clusters to pack variables and use one shift register to reduce the trouble of wiring. 2. If each variable uses a shift register, it is difficult to distinguish which variable the shift register belongs to without a name. Cluste
[Test Measurement]
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号