摘要
光电编码器是高精度位置控制系统常用的一种位移检测传感器。在位置控制系统中 ,由于电机既可能正转 ,也可能反转 ,所以要对与其相连的编码器输出的脉冲进行计数 ,要求相应的计数器既能实现加计数 ,又能实现减计数 ,即进行可逆计数。其计数的方法有多种 ,包括纯粹的软件计数和硬件计数。文中分别对这两种常用的计数方法进行了分析 ,对其优缺点进行了对比 ,最后提出了一种新的计数方法 ,利用 80 5 1单片机内部的计数器实现对光电编码器输出脉冲的加减可逆计数 ,既节省了硬件资源 。
In position control system, the electromotor should be able to turn back or forth, so the counter designed to count the pulse output from the photoelectric encoder connected to the electromotor should have the function of up down counting. That is reversible counting. There are many methods to count the pulse including software counting and hardware counting. These two methods of counting are analyzed in this paper, and a new method of counting is suggested after comparing the advantages and disadvantages of them. With fewer hardware, we obtained a high speed of reversible counting rate using the internal counter of the 8051 MCU.
出处
《电子工程师》
2004年第8期69-71,共3页
Electronic Engineer
关键词
光电编码器
计数器
加减计数
位置控制
photoelectric encoder, counter, reversible counting, position control