| With the continuous development of control technology and growing market demand, embedded PLC is widely applied in the field of industrial control. Motion control technology, as a new control technology, is becoming more sophisticated and popular, and must be penetrated into all aspects of industrial production. Most of PLC in the world offers some motion control functions. Some manufacturers have developed the motion controller based on PLC. In the control field, PLC's Motion function has a widely application and customer demands.In the thesis, the embedded PLC's chip group and the developing system of the embedded PLC are described, and the basic function and task scheduling of the kernel are elaborated. The method of developing motion function blocks based on the embedded PLC is expounded.In reference to other PLC, considering the actual situation of embedded PLC, two high-speed pulse input and two high-speed pulse output are planned. Embedded PLC has HSCS/HSCR/HSZ and pulse frequency measurement functions about pulse input, and has PLSY/PWM/PLSR functions about pulse output. During high-speed input, the single-phase count, single-phase double-counting, two-phase double- counting, and the function of high-speed event output in HSCS/ HSCR/ HSZ are realized. Two basic methods of frequency measurement are presented, and compare the advantages and the disadvantages of each method. In high-speed output section, analyse the error between the set frequency and the actual frequency. During the process of realizing the motion function block, Programmable Counter Array (PCA) provided by the C8051F020 MCU is used in a flexible way, and test results about the Motion function blocks are given. At last, detail Bag Making Machine how to work and the problem of material-sending. And how to use the motion function blocks finish the control of position curves of material-sending. |