The actual position of the motor is fed back by an incremental photoelectric encoder. LM629 increases the position signal a and B of the incremental photoelectric encoder to 4 times of the original, which improves the resolution of the encoder. A. Every time B logic state changes, the position register in LM629 is incremented (subtracted) by 1. When the signals a, B, and C of the encoder disk are at the same low level, an index signal is generated and sent to the index register to record the absolute position of the motor. [twenty one]Use the LM629 trapezoidal speed generator to calculate the required trapezoidal speed distribution. Two control modes can be realizedIn the position control mode, the microcontroller sends acceleration, maximum speed and final position data. LM629 uses these data to calculate the running track, as shown in Figure 6-4 (a). When the motor is running, it is allowed to change the above parameters to generate the trajectory shown in Figure 6-4 (b).In the speed control mode, the motor accelerates to the specified speed at the specified acceleration and maintains the speed until the new speed command is executed. If the speed is disturbed, LM629 can keep the average speed constant.