Using programming of PLC free port to achieve the real-time communication with the industrial control computer client software has not been widely studied and developed,with rare application cases in the engineering.In this paper,based on the discussion of the principles and the methods of the communication between Siemens S7 series PLC and virtual instrument software LabWindows/CVI,as an innovate point,PLC free port programming method is used to define the communication agreement between the upper and lower position machines and realize the communication through a serial port.The communication implementation scheme,with small hardware requirement,is economic,applicable,simple and flexible.What's more,it can be appropriate for the situations with fewer control nods and lower requirement of communication rate.%采用PLC自由口编程方法来实现与工控机客户端软件的实时通信,至今没有被广泛研究和开发,在工程上应用案例很少.文章讨论了西门子S7系列PLC与虚拟仪器开发软件LabWindows/CVI的通信原理和通信方式的基础上,创新性地采用PLC自由口编程方法,自定义上下位机通信协议,通过串口实现上下位机的实时通信.该通信实现方案硬件需求小,经济实用,简单灵活,适用于控制节点较少以及对通信速率要求不高的场合.
展开▼