Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading from com port
Message
From
24/04/1998 08:34:05
Ray Watson
A Certified Electronics Co
Knoxville, Tennessee, United States
 
 
To
23/04/1998 22:00:47
Daud Mydin
Hwang-Dbs Securities Berhad
Penang, Malaysia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00093552
Message ID:
00094626
Views:
30
Hi Daud,

If the data that is being received does not contain CR/LF chrs, your modem setup maybe appending them to the data. Look at the InputMode property also. It allows for Binary input (1) may help.

The RThreshold property is used to determine when a CommEvent Message is sent to your app on received data...if it is set to 0 no CommEvent Message will be sent on received data, if it is set to 1, a Message will be sent for every char received. Setting it to 80 means a Message will be sent only after 80 chars are received. Which may or may not be what you want.

If RThreshold is set to 1 it doesn't necessarily mean there is only 1 chr in the buffer. I usually set Rthreshold to 1 and in the OnComm method I reset it to 0 to stop more messages and then I parse the input buffer, process the data and reset Rthreshold to 1 to restart the Messages.

I don't have alot of experience with the MSComm Control especially with the handshaking protocols. My guess is the protocol you use is dependant on the protocol used by the machine your communicating with.

Hope this helps.

Ray
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform