Brief Introduction to Tobacco Field Remote Monitoring System Based on Virtual Instrument

Publisher:古宝奇缘Latest update time:2015-07-20 Source: dzsc Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  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 MeasurementAutomation software provided by NI.

  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 block 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 acquired. Here, the value of the Number of scans to acquire input port 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 scanning 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.

  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 data storage: read and calculate average subVI, text header subVI and table header subVI. The system uses a flat sequential structure to execute the entire data storage process. First, set a certain trigger time in the program (entered by the user on the front panel, in the format of 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), the resulting file includes the corresponding time information and data.

  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 the Read Characters From File.vi (read string data from a file) function and the Extract Numbers.vi (extract non-numeric symbols and convert them into numeric values) function.

  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:Brief Introduction to Tobacco Field Remote Monitoring System Based on Virtual Instrument

Previous article:Battery clamp visual inspection system based on virtual instrument technology
Next article:A brief discussion on the rapid realization method of self-made portable virtual instrument

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号