【正文】
achines. And at the same time, a lot of traditional factories for agricultural machinery production, began the production of packaging machinery. At the end of 1997, the number of packaging machinery factories has increased to more than 1,600, and there are about 75 research institutes engaging in research and development of packaging machinery. What’s more there are approximately more than 21 colleges and universities concerning packaging machinery professionally. However, the industry in China does not advance enough and it should be further improved. In the future the packaging machinery has a growing tendency for the application of microputer and electromechanical integration. A plete mechatronics system is a system to integrate multidisciplines such as machinery, puters microelectronics and sensors. It brings profound changes to the design, manufacturing and control of packaging machinery and changes the situation of the order to develop more quickly, something should be done to improve the level of packaging machinery, electromechanical integration, product reliability and stability, and thus the modern packaging industry will be improved. In this work, we simulate the control process of packaging assembly line based on stepper motor which is operated by SCM. First we introduce the overall design of hardware circuit and the main connection of hardware, and then describe the software design and programming ideas, at last we testify the feasibility of the design by experiment, as well as prospect for the future packaging machinery. 2 HARDWARE CIRCUIT DESIGN Overall Circuit Design To facilitate the experiment, the parts of scissors and stepper motor are instead by 9 9 lightemitting diodes. When the lightemitting diodes are light, that means the corresponding ports output high level. While they are not light, that means the corresponding ports output low level. A photoelectric switch is installed on the conveyor belt. If there is no product passing, the infrared receiver and transmitter devices of the photoelectric switch are closed and the output is high level. If some object is passing, the infrared is interrupted and it outputs a negative pulse immediately. Once the input port of SCM detects the negative pulse transmitted by the photoelectric switch, the outputs of SCM will produce special electrical levels controlled by program, transmitting to a driver chip to make stepper motor work. When the packing time is up, SCM outputs a pulse to the relay, making the scissors close so that cutting off the packing tape. After that the scissors open again, waiting for the next action. Main Components Stepper Motor A stepper motor is a machine which transmits electrical pulse signals into angular or linear displacement. The stepper motor can be used as a special motor for controlling other machines because its errors will not be accumulated. It is widely used in a variety of occasions of openloop. STC89C516RD+ SCM is an abbreviation of a singlechip microputer, which is also known as a microcontroller. It is a semiconductor chip, integrated by a CPU, ROM, RAM, I/O interface, timer/counter, interruption systems and some other ponents, constituting a plete digital puter. At present SCM has