小弟初学 要开启M0
M0 address 是0800所以根据plc的datasheet 传送讯息为: 01 05 08 00 FF 00 F6 CR LF
小弟程式码如下
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim Port As String
SerialPort1.PortName = "COM6"
SerialPort1.BaudRate = 9600
SerialPort1.DataBits = 7
SerialPort1.Parity = IO.Ports.Parity.Even
SerialPort1.StopBits = 1
SerialPort1.Open()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
SerialPort1.WriteLine(":01050800FF00F6CRLF")
End Sub
End Class
不过plc没有反应 请问要如何修改程式 谢谢