小弟初學 要開啟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沒有反應 請問要如何修改程式 謝謝