(2) Visualization module

The visualization module includes a data acquisition module, industrial computer, etc. Among them, the data acquisition module is mainly used to receive the pulse signal collected by the incremental rotary encoder and the color mark sensor amplifier. It is uploaded to the industrial computer through RS485 communication. The industrial computer uses the Labview software to build the system, and the data is processed and displayed. The industrial computer adopts a multi-function integrated machine. The interface of the sowing quality monitoring system of the cotton precision seeder is shown in Figure 4. It can visually display parameters such as the number of seeds, the number of missed seeds, the speed of the hole seeder, the forward speed of the machine, and the sowing area. It realizes real-time display, alarm, and storage of data such as alarm information and data monitoring information. The system is equipped with a variety of detection modes suitable for various targets. It has the advantages of good handling of workpiece motion and vibration, and can meet the actual requirements of the sowing quality monitoring system.

**Figure 4.** The interface of sowing quality monitoring system of cotton precision planter.

2.2.2. Monitoring System Software Design

This software program uses Labview software graphical programming to monitor parameters such as the number of sowings, the number of missed sowings, the speed of the hole seeder, the forward speed of the machine, and the sowing area. They are displayed on the corresponding controls on the interface in real time. It has the functions of alarming and storing data such as alarm information and data monitoring information (as shown in Figure 4). The software provides quick real-time understanding of cotton planting and missed planting status. It can solve the technical problem that cotton film-laying and sowing is not easy to detect, and effectively improve the operation quality and work efficiency of cotton sowing.

The system software flow chart is shown in Figure 5. Before the system starts, it performs an initial configuration and then sets system parameters. It obtains each parameter value through the corresponding protocol analysis. When starting the system, the colorcoded electric eye color fiber optic sensor collects the RGB color of the cotton species. At the same time, the color mark sensor amplifier compares the reference color RGB value and the identification color to form a pulse signal. Incremental rotary encoders generate directionidentifiable counting pulse signals through rotating grating discs and optocouplers. They are transmitted to the industrial computer through the data acquisition module, and the forward speed of the machine and the seeding amount are calculated. Combined with the machine advance speed feedback data, it obtains the seeding grain distance (multiplied by the time interval between the two adjacent pulses identified by the implemented advance speed). Then, through the comparison between the actual seeding grain distance and the expected grain distance, the missed seeding can be judged, and the real-time alarm of missed seeding can be realized. Using Labview software, the industrial computer receives and processes sensor data in real time, and visualizes and monitors its parameters.

**Figure 5.** Program flow diagram of software system.
