首页 | 本学科首页   官方微博 | 高级检索  
     

用VB 6.0实现工控软件和下位机的串口通信
引用本文:阚江 孙苓生 等. 用VB 6.0实现工控软件和下位机的串口通信[J]. 电力自动化设备, 2002, 22(9): 34-37
作者姓名:阚江 孙苓生 等
作者单位:上海交通大学,电气工程系,上海,200030
摘    要:针对自动化控制中出现的工控软件串口通信驱动程序不支持现有设备的问题,基于DDE(Dynamic Data Excehange)技术,用VB6.0实现了一个能被绝大多数工控软件使用的串口通信接口程序。对下位机,利用MSComm控件收发串口数据;对工控软件,通过DDE方式与其交换数据,使得工控软件能透明地操作串口数据。实际工程运行表明,该方法实现简单,功能适用,运行可靠。另外,在工业现场的实现应用常常需要定时发送数据,而VB提供的定时器控件只能精确到55ms左右,利用WinAPI实现了精度1ms的高精度定时器。

关 键 词:VB6.0 工控软件 下位机 串口通信 动态数据交换 程序设计
文章编号:1006-6047(2002)09-0034-04

Serial communication between industrial control software and slave system with VB 6.0
KAN Jiang,SUN Ling sheng,ZHANG Ming. Serial communication between industrial control software and slave system with VB 6.0[J]. Electric Power Automation Equipment, 2002, 22(9): 34-37
Authors:KAN Jiang  SUN Ling sheng  ZHANG Ming
Abstract:Regarding to that the serial communication driver provided with industrial control software does not support current devices in automation control,a DDE based serial communication software with VB 6.0 is developed,which can be applied by most industrial control software.For the slace system,the MSComm Controller is used to receive and transmit serial data,for the industrial control software,the data is exchanged transparently via DDE(Dynamic Data Exchange).The engineering practice proves that it is easy in implementation,applicable in functions and reliable in operation.In addition,the data are normally transmitted by time schedule in industrial control and the timer control provided by VB can not be less than 55 ms,WinAPI is hence adopted to set a timer with 1 ms resolution.
Keywords:industrial control software  serial communication  DDE  timer
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《电力自动化设备》浏览原始摘要信息
点击此处可从《电力自动化设备》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号