Im trying to raed data over a com port. The data comes over the serial
port as such reading CRLF reading CRLF and so on.
The code below only sees the first reading CRLF and then only added
that into the DSIDXPort arraylist and never adds readings 2 through
16.....
How can I get it to read those?
[code]
serialPort.Read Timeout = 50
serialPort.Disc ardInBuffer()
Dim strData As String = String.Empty
If Not serialPort.IsOp en Then
strData = String.Empty
Else
strData = serialPort.Read Line
End If
If strData.Length 0 Then
Dim tempArray() As String
strData = strData.Replace (vbCrLf,
vbTab).Replace( Chr(26), "").Replace(Chr (12), "").Replace(Chr (13), "")
'parses out the information gathered from the COM port
to a temp location
tempArray = Split(strData, vbTab)
If serialPort.Read Timeout = 50 Then
Dim intLoop As Integer
For intLoop = 0 To UBound(tempArra y)
If IsNumeric(tempA rray(intLoop)) Then
DSIMRPort.Add(t empArray(intLoo p))
End If
Next
End If
end if
[\CODE]