摘要
本文通过一个实际例子说明在VB6.0下利用串口通信实现对PLC输出端口Y的控制。在VB6.0中想实现串口通信一定要掌握MSComm通信控件的参数设置方法,传送过程中使用十六进制数据。由于单击置位或复位按钮,产生一个二进制数据,最后转换为ASCII码,最后驱动PLC输出。
This paper illustrates the control of the PLC output port Y by using serial port communication in VB6. 0. In VB6. 0,that implement the serial port communication needs to control the parameter settings of MSComm control,using hexadecimal data in the transfer process. Because of the click or reset button,a binary data is produced,which is converted to ASCII and eventually drives the PLC output.
出处
《职业技术》
2017年第8期115-118,共4页
Vocational Technology