微型机与应用
微型機與應用
미형궤여응용
MICROCOMPUTER & ITS APPLICATIONS
2012年
18期
1-4
,共4页
李世光%孟强强%桑志峰%朱晓莉%张锴%陈曰印
李世光%孟彊彊%桑誌峰%硃曉莉%張鍇%陳曰印
리세광%맹강강%상지봉%주효리%장개%진왈인
红外通信%多串口%Visual%C++%系数修正
紅外通信%多串口%Visual%C++%繫數脩正
홍외통신%다천구%Visual%C++%계수수정
infrared communication%multiple serial ports%Visual C++%coefficient correction
为了配合自主研发的超声波热量表的检定工作,依据公司制定的热量表红外通信协议,进行了热量表修正软件的设计。该软件实现了对热量表流量和温度系数的修正,进而提高了热量表的检定精度。在Visual CC++6.0平台下,通过MFC来创建应用程序框架,利用多线程串口通信类CnComm完成多线程之间的数据通信任务。通过发送控制命令和构造接收处理子程序来完成对串口数据的读写和显示。同时,利用ADO类对数据库进行访问,实现历史记录的查询功能。该软件经过实际检验,操作简单方便,通信可靠高效,达到了检定工作的要求标准。
為瞭配閤自主研髮的超聲波熱量錶的檢定工作,依據公司製定的熱量錶紅外通信協議,進行瞭熱量錶脩正軟件的設計。該軟件實現瞭對熱量錶流量和溫度繫數的脩正,進而提高瞭熱量錶的檢定精度。在Visual CC++6.0平檯下,通過MFC來創建應用程序框架,利用多線程串口通信類CnComm完成多線程之間的數據通信任務。通過髮送控製命令和構造接收處理子程序來完成對串口數據的讀寫和顯示。同時,利用ADO類對數據庫進行訪問,實現歷史記錄的查詢功能。該軟件經過實際檢驗,操作簡單方便,通信可靠高效,達到瞭檢定工作的要求標準。
위료배합자주연발적초성파열량표적검정공작,의거공사제정적열량표홍외통신협의,진행료열량표수정연건적설계。해연건실현료대열량표류량화온도계수적수정,진이제고료열량표적검정정도。재Visual CC++6.0평태하,통과MFC래창건응용정서광가,이용다선정천구통신류CnComm완성다선정지간적수거통신임무。통과발송공제명령화구조접수처리자정서래완성대천구수거적독사화현시。동시,이용ADO류대수거고진행방문,실현역사기록적사순공능。해연건경과실제검험,조작간단방편,통신가고고효,체도료검정공작적요구표준。
In order to coordinate with the calibration operation of the heat meter of ultrasonic researched and developed independently, this article designs a heat meter correction software according to the infrared communication agreement of the heat meter worked out by our company. This software corrects the flow of heat meter and temperature coefficient, and further improves the cal- ibration accuracy of the heat meter. Based on the platform of Visual C++ 6.0, this article creates the framework of application program with MFC, and completes the multi-thread data communication tasks with CnComm, the multi-thread serial interface com- munication class. This software realizes the read and write as well as display functions of serial port dates by sending control commands and constructing receiving and treating subprogram. At the same time, by using ADO class to access the database, this soft- ware realizes the function of query to historical record. Practice shows that providing easy and convenient operation as well as reliable and efficient communication, this software has already reached the required standard of calibration operation.