Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Missing data with MSCOMM
Message
From
12/01/2004 05:22:50
 
 
To
All
General information
Forum:
Visual Basic
Category:
ActiveX controls
Title:
Missing data with MSCOMM
Miscellaneous
Thread ID:
00865916
Message ID:
00865916
Views:
66
Hi,

My VB written application when communicating with a external device
at 14400,N,8,1 parameter will cause data overrun, result in some
data missing.

I had configure it to use handshaking of Xon/Xoff and set the
Inputlen = 0 property. Below is my code for the OnComm event
I can't feature out why it had missing ETX (last character)
that I expected when I expect long reply from it. This
does not happen for short reply.

Anyone had any suggestion or comment for me on this
issue.

OnComm Event
============

IF MsComm.InbufferCount >= 1

cChar = MsComm.INPUT

cBuffer = cBuffer + cChar

IF Instr(cBuffer,CHR(2)) then <--- this will work for short/long reply
WFile("STX detected")
ENDIF

IF Instr(cBuffer,CHR(3)) then <----this will not work for long reply
WFile("ETX detected")
ENDIF


ENDIF
Best Regards
Virusim
Next
Reply
Map
View

Click here to load this message in the networking platform