dim ECUData(27) as integer dim RXArray(27) as integer
Private Sub Receiver(ByVal sender As Object, ByVal e As SerialDataReceivedEventArgs) Handles COMPorts.DataReceived If COMPorts.IsOpen = False Then COMPorts.Open() End If Dim RXByte As Byte RXCnt = 0 Do RXByte = COMPorts.ReadByte RXArray(RXCnt) = Chr(RXByte) ' Convert each byte to two hexadecimal characters RXCnt = RXCnt + 1 ECUData(RXCnt) = RXByte <---------Getting Error in This Line Loop Until (COMPorts.BytesToRead = 0) ' Don't return if more bytes have become available in the meantime '----- End of communication protocol handling ------------------------------------------------------------- Me.Invoke(New MethodInvoker(AddressOf Display)) ' Start "Display" on the UI thread End Sub
COMPorts.BytesToRead > 27
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)