Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Missing data with MSCOMM
Message
From
26/01/2004 02:38:18
 
 
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00865916
Message ID:
00870491
Views:
12
Hi,

Thank for your advise, I had done so but still the same result.
FYI, I clear the inbuffer & outbuffer before senting any command.

>It sounds like you need to increase your InBufferSize property of the MSCOMM. Default is 1024 bytes so try setting it to something higher. HTH.
>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform