Sub ConnectToRS
Try
sp.Initialize("")
Log(sp.ListPorts)
sp.Open("COM7")
sp.SetParams(9600,7,2,2)
astream.Initialize(sp.GetInputStream,sp.GetOutputStream, "astream")
Catch
Log(LastException)
End Try
End Sub
Private Sub Button2_Click
Dim SendTxt As String
SendTxt=Chr(7) & "01RM138" & Chr(3)
Log(SendTxt)
astream.Write(SendTxt.GetBytes("ASCII"))
End Sub
Sub AStream_NewData (Buffer() As Byte)
Dim s As String = BytesToString(Buffer, 0, Buffer.Length, "ASCII")
Log(s)
End Sub