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.
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
- Popular Resources
- Popular amplifiers
- 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?
- In what situations are non-contact temperature sensors widely used?
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- MAX6675 temperature instability
- The pitfalls of first contact with sensortile.box
- Award-winning live broadcast: Hidden costs of isolation system design
- UA level constant current source output chip
- Issues with changing MAC when batch flashing blueNRG-1 with BlueNRG-X Flasher Utility
- EEWORLD University Hall ---- Lao Wu's MCU Practice_NO.1 Project Practice
- [NXP Rapid IoT Review] + Rapid IoT Studio online IDE
- I'm studying BQ76940 recently and want to develop a BMS. I've been looking for information and encountered some questions during the process.
- [Sipeed LicheeRV 86 Panel Review] 4. Building a cross-compilation environment
- [Speech and vision module based on ESP32S3] Software development progress - ESP32S3 JPEG encoding performance test