湖北师范学院学报(自然科学版)
湖北師範學院學報(自然科學版)
호북사범학원학보(자연과학판)
JOURNAL OF HUBEI NORMAL UNIVERSITY(NATURAL SCIENCE)
2013年
4期
63-68
,共6页
消息机制%Visual Studio%WM_TIMER定时器%多媒体定时器%定时精度
消息機製%Visual Studio%WM_TIMER定時器%多媒體定時器%定時精度
소식궤제%Visual Studio%WM_TIMER정시기%다매체정시기%정시정도
messages mechanism%Visual Studio%WM_TIMER timer%multimedia timer%timing accuracy
实时数据采集是工业控制中极为重要的环节。在某项目中,以Visual Studio为开发工具,上位机对可编程逻辑控制器( PLC)进行数据实时采集使用了两种方案:一种是采用基于消息机制的WM_TIMER定时器,另一种是微软提供的多媒体定时器。阐述了两种定时器的实现方法及其优缺点,可在具体应用中适当选择。最后设计实验对两种定时器进行了十分直观的对比。
實時數據採集是工業控製中極為重要的環節。在某項目中,以Visual Studio為開髮工具,上位機對可編程邏輯控製器( PLC)進行數據實時採集使用瞭兩種方案:一種是採用基于消息機製的WM_TIMER定時器,另一種是微軟提供的多媒體定時器。闡述瞭兩種定時器的實現方法及其優缺點,可在具體應用中適噹選擇。最後設計實驗對兩種定時器進行瞭十分直觀的對比。
실시수거채집시공업공제중겁위중요적배절。재모항목중,이Visual Studio위개발공구,상위궤대가편정라집공제기( PLC)진행수거실시채집사용료량충방안:일충시채용기우소식궤제적WM_TIMER정시기,령일충시미연제공적다매체정시기。천술료량충정시기적실현방법급기우결점,가재구체응용중괄당선택。최후설계실험대량충정시기진행료십분직관적대비。
Real-time data collection is extremely important in industrial control link .In a project,development tools in Visual Studio,PC acquires real-time data on PLC using the two programs:One is WM_TIMER timer based on the messages mecha-nism,Another is Microsoft's multimedia timer.This paper describes the advantages and disadvantages of both methods ,which can be appropriately selected Depending on the application .Finally,we carried out pretty straightforward contrast on the two timers through the design of experiments .