第27卷第4期河南理工大学学报(自然科学版)Vo.l27No.4
28年8月JOURNALOFHENANOLYTECHNICUNIVERSITY(NATURALSCIENCE)Aug.28
基于工具包的研华CI_168通讯卡OC
服务器软件的实现
魏长军,吴青,陈兴宝,赵春雨
(沈阳理工大学信息工程学院,辽宁沈阳110168)
摘要:讲述了基于工具包的硬件设备OC服务器软件的快速实现方法,以研华CI_168
CAN通信卡为背景给出了详细的实现过程,主要包括OC服务器软件结构分析、OC服务
器开发工具包WTOCSvr.dll和CI_168通信卡AI软件包分析、并利用WTOCSvr.dll实
现OC接口,借助通信卡AI实现OC服务器程序与硬件通信部分,针对CAN2.0B设计了
OC服务器中维护的变量的数据结构,给出了收发数据的算法并利用多线程实现了CAN信
息帧数据的收发.借助开发工具包不但大大降低了OC服务器软件开发的复杂度,而且缩
短了开发周期,并提高了程序的稳定性.
关键词:OC;工具包;通信;服务器;COM
中图分类号:T311.1文献标识码:B文章编号:1673-9798(28)04-0437-05
TherealizationofOCserverforYanhuaCI_168communicationcard
basedonthetoolkit
WEIChang-jun,WUQing,ChenXing-bao,ZHAOChun-yu
110168
TherapidrealizationmethodofOCserverforhardwareisdemonstrated,andthedetailrealizing
processbasedontheYanhuaCI_168communicationcardisgiveninthepaper,whichincludingthesof-t
warestructureanalysisoftheOCserver,theanalysisfortheWTOCSvr.dllandCI_168communication
carddevelopmenttoolki.tTheOCinterfaceisrealizedbasedontheWTOCSvr.dl,landthecommunication
betweentheOCserverandthehardwareisobtainedbasedontheAIofthecard.Thedatastructureforthe
variantintheserveraimattheCAN2.0Bprotocolisdesigned,andthereveivingandsendingarithmeticfor
CAN2.0Bdataframebyusingthemultithreadingisgiven.Recurtotheusingoftoolki,titgreatlyreducing
thedevelopingcomplexityofthesoftware,shorteningthedevelopmentcycleandmiprovingthestabilityofthe
program.
OC;developmenttoolki;tcommunication;server;COM
引言
工业过程控制系统的上位机监控程序部分常采用组态软件来开发,组态软件往往