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.
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
- Popular Resources
- Popular amplifiers
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Arduino Nano collects temperature and humidity data through LabVIEW and DHT11
- Modern Testing Technology and System Integration (Liu Junhua)
- Computer Control System Analysis, Design and Implementation Technology (Edited by Li Dongsheng, Zhu Wenxing, Gao Rui)
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- SPI receive and send function program
- Teardown of fake Macbook charger: Convincing on the outside, dangerous on the inside
- A comprehensive look at Sub-6Ghz massive MIMO infrastructure
- Detailed explanation of the schematic diagram of each part of the flyback switching power supply UC3842 protection circuit
- Several indoor wireless positioning technologies
- NXP Rapid IoT Review] +4. Learn the design ideas of POWER circuits
- 1. The relationship between the register value and the analog signal voltage. Different voltage values have different states in the register...
- HTS221 self-heating function test
- Understanding the configuration of C2000 series CMD files
- A batch of STM32F103RBT6 10 packages in stock