|
-
Apr 13th, 2004, 06:56 PM
#1
Thread Starter
Hyperactive Member
MSCOMM Question
I have this device that communicates with the serial port. It sends a total of 32 bytes, 2 at a time, with an interval of only a few milliseconds. I am using the MSComm control to handle the info and its Input property to get the data. However, I don't understand how to use the OnComm event it generates when the Input property changes.
OK. Lets suppose the following situation:
The port receives two bytes
The OnComm event is triggered
The instructions for the event begin to be processed
The port receives two more bytes, but the instructions for the previous events are not done yet
Now, will the OnComm event trigger immediately, or will it wait until the previous event’s instructions are completed?
Will the events pile up and be executed whenever it is possible, or will events just be lost and forgotten by the program?
-
May 5th, 2004, 08:32 AM
#2
New Member
Your data will be saved in the Comm Control Input Buffer. The input size can be specified at design time. I think the default is 1024 bytes. As long as the number of bytes in the input buffer does not exceed the size of the input buffer, then your data is safe.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|