摘要
高精度位置控制系统常用光电编码器作为直线位移检测传感器。由于监测的位移通常是正反两个方向变化的,因此,要用光电编码器输出脉冲反映并记录这种双向的位移变化,就要实现对脉冲进行可逆计数,既要能加计数,又要能减计数。文中介绍了一种利用80C32单片机内部计数器T2对光电编码器输出脉冲的加减计数的具体实现方法,该方法已在油田试井深度监测系统中得到应用,实践证明该方法既节省了硬件资源,又能得到很好的计数效果,是一种简单实用的脉冲可逆计数方法。
Opto-electric encoder is often used as a linear displacement sensor in precision position control system. Usually, the direction of the monitored displacement is often changed to and fro. Therefore, in order to reflect the actual change of displacement, the counter designed to count the output pulse of the opto-electric encoder should have the function of up-down counting. Taking the inner timer T2 of single chip computer 80C32 as a counter, a new kind of useful counting method for output pulse of the opto-electric encoder was introduced in this paper. The method has been used in monitoring the downhole depth during the oil well testing. The result indicated that the counting method introduced in the paper was simple and practical. It not only can save the hardware resources but also get an accurate counting result.
出处
《组合机床与自动化加工技术》
2006年第7期42-43,45,共3页
Modular Machine Tool & Automatic Manufacturing Technique
基金
黑龙江省教育厅科学技术研究项目(10551002)
大庆石油学院科技发展基金资助项目(YJJXM2004015)
关键词
光电编码器
脉冲计数
单片机
opto-electric encoder
pluse counting
single chip computer