摘要
本文介绍了软件定时器的概念、特点和作用,提出了两种实现方法:标志建立法和次数经过法,还分析了时基小、程序执行周期长和累计计时这两种条件下软件定时器产生较大误差的原因,并讨论了减小误差的解决方案。
This paper introduces the basic concept,trait and function of soft timer,and puts forward two kinds of realization:setting flag s and counting times.It also analyses the reason why soft timer bring big g er error when it meets the following two instances:timebase is short while running cycle is long and time should be cumu-lated,then the paper discusses the improved methods to minimize these errors.
出处
《工业控制计算机》
2002年第11期46-48,共3页
Industrial Control Computer