The rotation of stepper motor is controlled by controlling the number of pulses, the frequency and the order of the winding of each phase of the motor. Usually, the rotor of a motor is a permanent magnet. When the current flows through the stator winding, the stator winding generates a vector magnetic field. The magnetic field will drive the rotor to rotate at one angle, so that the direction of one pair of magnetic fields of the rotor is consistent with the direction of the magnetic field of the stator. When the stator's vector magnetic field is rotated in an angle. The rotor also turns to an angle with the magnetic field. Each input of an electrical pulse, the motor rotates one angle forward. The angular displacement output is proportional to the number of input pulses, and the speed is proportional to the pulse frequency. When the winding is energized, the motor will reverse.