摘要
为了保证实时控制系统的控制精度,往往要求能精确定时。在VisualC++中提供多种定时方案,对常见的几种定时方法进行了对比、分析。针对精准施药系统的定时要求,分别采用QueryPerformance-Frequency()和QueryPerformanceCounter()函数及多媒体两种方法进行定时。经过测试,表明两种方法均能够满足系统提出的定时精度要求,但前者与计算机的硬件配置有关,因此在精准施药系统中采用基于多媒体的定时方法。
Many real-time control systems need precise timing in order to insure the control precision. It analyzes and contrasts several timers that Visual C++ offered in the paper. Base on the requirement of precise timing in the precision sprayer, It realizes the precise timing with two ways, which are multimedia timer and timer with functions of QueryPerformanceFrequency 0 and QueryPerformanceCounter O, in the precision sprayer. It can reach the control precision with two ways through testing. Because the timer, with functions of QueryPerformanceFrequency () and QueryPerformanceCounter (), realizes on the configuration of computer, the precision sprayer realize the precise timing with multimedia timer in this paper.
出处
《农机化研究》
北大核心
2007年第5期191-193,共3页
Journal of Agricultural Mechanization Research