

The real-time control system for grading and unloading process of weighing and sorting machine proposes a continuous dynamic alignment method between product grade information and real-time position of products to realize real-time detection and continuous tracking of dynamic position of product flow on the conveying line, continuous dynamic alignment between product grade information and its real-time position, and automatic control of grading and unloading process of products. The circuit structure of the control system is given to analyze the control process of the stepping motor, and the actual operation experiments show that, under the control of the system, all the products can be unloaded automatically and smoothly at the entrance and exit of the grades determined by the detecting device.

The detector is a universal system, and the environment and detection objects vary greatly. Therefore, you need to configure the detector according to the specific environment and detection content. Generally, the program debugging of embedded system needs to use emulator, which can only modify the program code, which is time-consuming and laborious and inconvenient to use. Therefore, this system designs a set of programs that can be configured online through network interface. In this way, only one ordinary network connection is needed to connect the heavy machine to the computer, and the system parameters can be conveniently configured and the image situation can be viewed in real time by using this program. The configuration content includes camera IP address and port number, SPI configuration and output, UART configuration, image height width and gain properties, camera exposure time and other parameters, and related image storage and display of the image.
In addition to using the appropriate algorithm to process the acquired images effectively, the industrial online sorting scale must also meet the requirements of real-time, so it is necessary to optimize the algorithm program to give full play to the arithmetic ability of DSP. DSP is a kind of device with parallel instruction execution function. DM642 used in this system can execute 8 instructions in parallel in one instruction cycle. The purpose of optimization is to reduce the correlation between program statements and execute more in parallel, giving full play to the computing power of DSP. In addition, when the optimization design of the system using C language still can not meet the requirements, it is necessary to use linear assembly programming for the core program which is mainly based on the loop body.
For the pictures collected by the Sorting machine on the actual working production line, for the pill test carried out on the packaging production line, the test content is to check whether the item is packed into the package and whether the pill is damaged. The operating speed of the packaging equipment is 2m/s. It can really collect the image of the detection target on the high-speed production line, and the image gray level is uniform, basically no distortion, and the details are clear, which can fully meet the requirements of image processing. In the test of the system operation speed by using the optimized FFT program, the test object is 1024x1024 black and white image, and the running time is 14ms. The appearance of an interrupt interrupts the operation of the processor, and the execution of an interrupt requires a series of programs to protect and restore the current operation process, which makes the efficiency of interrupt processing much lower than that of the operation program. The relationship between the number of interrupts per second and the operation efficiency is given.