Stepper motor stepper motor for delicate volume, low cost, stable operation, etc is widely used in each big industry. Although the stepper motor has been widely used, but the step motor motion control to realize the closed loop control is still a big problem to industrial control industry. Problem mainly is the origin of uncertainty and out-of-step phenomenon. At present, the high-speed photoelectric switch as the origin of stepper system, the error in millimeter, so in the field of precise control, are not acceptable. In addition, in order to improve the operation accuracy, driving stepper motor system to adopt more segmentation, some more than 16, if use in the process of reciprocating motion, the great error in the amazing. Already can not adapt to the processing field. For this purpose, the step motor closed-loop control system is put forward, so as to adapt to the current demand in the field of motor control. 1, the hardware connection hardware connection with encoder, according to the requirement of segmentation, with different levels of resolution encoder real-time feedback. 2, origin control, according to the Z encoder signal identification, calculate the origin of coordinates, same with nc system, the precision can reach 2 / encoder resolution & times; 4. Step 3, loss control according to the feedback of the encoder data, real-time adjustment of the output pulse, according to the step adjustment, adopt corresponding measures. Below is circuit principle: 4, circuit principle, circuit adopts FPGA vlsi circuit, input, output, can achieve trillion level of the corresponding frequency, power supply 3. 3 v, using the 2596 switch power supply, 24 v to 3. 3 v, convenient and practical. Input pulse and feedback pulse after 4 times frequency orthogonal decoding computation, correcting frequency and quantity of the output pulse. 5, application, describe the circuit has two modes, return to the origin mode and run mode. When the origin that can switch setting, into the origin mode, on the other hand, into the operating mode. At the origin model, synchronously in the frequency of the input pulse output pulse, when touching the origin switch, reduce the output pulse frequency, according to the Z encoder signal identification, calculate the origin of coordinates. After the completion of the return to the origin, the output signal. The signal and its data in electric power, forever. In the run mode, synchronously in the frequency of the input pulse output pulse, calculate the feedback data at the same time, if appear error, correction in a timely manner. In addition, the operation of the large inertia, deceleration setting unreasonable situation, may reverse correction in a timely manner. 6, technical indicators (1)Input and output the corresponding frequency: & le; 1M; (2)Pulse synchronization time error: & le; 10 ms; (Major delays in reverse, regardless of the reverse correction, & le; 10us)(3)Relocation: electric precision & ge; 2 / encoder resolution & times; 4 / motor resolution & times; Segment)(4)Relocation origin precision electrical & ge; 2 / encoder resolution & times; 4 / motor resolution & times; Segment)(5)To adapt to the PNP and NPN interface (6)To adapt to the servo pulse control (7)To adapt to all kinds of coding once its interface stepper motor motion control to solve the above problem, increase the cost of hundreds of yuan can be realized under the condition of full closed loop control, as servo motor system. Especially the characteristics of low cost, simple control, long life in some occasions, may be better than that of the servo system.