Colin
asked on
How to clear unwanted characters from COM buffer
I am suppose to be getting back in my COM Buffer the word " LH FLUSH" however along with the LH FLUSH I get the following "UU LH FLUSH" or "UU LH FL?SH" I clear my InBuffer however I still get the result above. My code is below:
serialPort.BaudRate = "9600"
serialPort.PortName = "COM" & activeport
serialPort.Parity = IO.Ports.Parity.None
serialPort.DataBits = 8
serialPort.StopBits = 1
serialPort.RtsEnable = True
serialPort.Open()
serialPort.Write("<@:L" & tempArray(0) & Total_Bytes & "<" & UpdatePoint & "," & "0" & Int_Rank & "," & GageDescription & "," & USL & "," & LSL & ">")
System.Threading.Thread.Sl eep(100)
serialresponse1 = serialPort.ReadExisting
What Am I doing Wrong?
serialPort.BaudRate = "9600"
serialPort.PortName = "COM" & activeport
serialPort.Parity = IO.Ports.Parity.None
serialPort.DataBits = 8
serialPort.StopBits = 1
serialPort.RtsEnable = True
serialPort.Open()
serialPort.Write("<@:L" & tempArray(0) & Total_Bytes & "<" & UpdatePoint & "," & "0" & Int_Rank & "," & GageDescription & "," & USL & "," & LSL & ">")
System.Threading.Thread.Sl
serialresponse1 = serialPort.ReadExisting
What Am I doing Wrong?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
That is what handshaking/flow control configuration are designed for. Does the device require any handshaking, like request-to-send or XOn/XOff? I see where you had RtsEnable set to true, but you didn't set anything for Handshake...
ASKER
Thanks.