Hello All:
I am receiving data in hex format using serial communication MSCOMM control.The data reads ok but when it find hex(0) means EndofFile character in ASCII it exits and does not read data after the EndofFile character.
The code for receiving hex data is:
Private Sub MSComm1_OnComm( ByVal sender As Object, ByVal e As System.EventArg s) Handles MSComm1.OnComm
Dim m_cardData As String
Do
Loop Until MSComm1.InBuffe rCount > 185
m_cardData = MSComm1.Input
txtCardData.Tex t = m_cardData
If m_cardData <> "" Then
With MSComm1
.Handshaking = MSCommLib.Hands hakeConstants.c omNone
.RThreshold = 0
.RTSEnable = False
.SThreshold = 0
.PortOpen = False
End With
End If
End Sub
Any help?
I am receiving data in hex format using serial communication MSCOMM control.The data reads ok but when it find hex(0) means EndofFile character in ASCII it exits and does not read data after the EndofFile character.
The code for receiving hex data is:
Private Sub MSComm1_OnComm( ByVal sender As Object, ByVal e As System.EventArg s) Handles MSComm1.OnComm
Dim m_cardData As String
Do
Loop Until MSComm1.InBuffe rCount > 185
m_cardData = MSComm1.Input
txtCardData.Tex t = m_cardData
If m_cardData <> "" Then
With MSComm1
.Handshaking = MSCommLib.Hands hakeConstants.c omNone
.RThreshold = 0
.RTSEnable = False
.SThreshold = 0
.PortOpen = False
End With
End If
End Sub
Any help?