Abstract:An intelligent pharmacy dispensation algorithm has been proposed in view of such flaws as time delay, randomness, and subjectivity in the process of pharmacy dispensation. Based on the torque equation of a DC motor, a control system is established with EAN-13 programming rules combined together for corresponding medicine, which achieves the effect of an automation of pharmacy dispensation, thus solving such problems as slow pharmacy dispensation and prolonged queuing time. The physical model has verified the feasibility and effectiveness of the algorithm.