摘要
为了在WinCC组态软件中实现与串口的通讯,文中介绍了两种方法:一是在WinCC中调用VB编写好的串口通讯程序,进行数据交换,实现对串口的访问;二是在WinCC图形编辑器中调用ActiveX控件MSComm,编写全局脚本VBS实现对串口的访问。这两种方法很好地解决了组态工程师被WinCC所束缚的串行通讯操作限制问题,拓宽了工程师使用WinCC的灵活性,提高了组态效率。
In order to realize serial communication with ActiveX based on WinCC, two methods are described in this paper. The first method is divided into two steps. First, realize serial communication by programming in Visual Basic, and then call this executive program in WinCC to exchange data. The second method is calling the ActiveX control MSComm directly in the Graphics Designer of WinCC and programming in WinCC Global Scripts to realize serial communication. These two methods are good solutions to the limitations of serial communication operation in WinCC. By these ways, engineers can use WinCC more flexibly, thus improve their configuration efficiency.
出处
《电子测量技术》
2006年第2期115-116,121,共3页
Electronic Measurement Technology