摘要
光电编码器是位置控制系统中一种常用的位移检测传感器。通过对与被控对象连接的编码器输出的脉冲数进行可逆计数,可计算出编码器的直线位移或角位移。实际应用中输出脉冲受物理和电磁干扰会存在毛刺和抖动现象,影响计数结果。为此,在80C51单片机基础上对单中断和双中断两种常用计数方法进行分析对比,提出了一种新的扫描计数法。扫描计数法通过定时扫描和对比两路脉冲序列的相位关系完成辨向和计数,既能更准确辨向和计数,又能节省硬件资源。
Photoelectric encoder is one of the commonly used sensors for detecting displacement in position control system. By reversibly counting the output pulses of the encoder that connecting with the controlled object, the linear displacement or angular displacement can be calculated. But in practical applications, because of the physical and electromagnetic interferences, glitches and jittering phenomenon may exist in output pulses, thus the counting result is incorrect. Based on 80C51 single chip computer, two of the commonly used counting methods, i. e. , the single interrupt and double interrupt methods are analyzed, and the new scanning counting method is proposed. With this method, two of the pulse strings are scanned timely, through comparing the phase relationship between two pulse strings, direction discrimination and counting are completed precisely using less hardware resources.
出处
《自动化仪表》
CAS
北大核心
2013年第4期62-65,共4页
Process Automation Instrumentation
关键词
光电编码器
位移检测
可逆计数
脉冲扫描
高精度
Photoelectric encoder Displacement detection Reversible counting Pulse scanning High accuracy