Results 1 to 2 of 2

Thread: MSCOMM Question

  1. #1

    Thread Starter
    Hyperactive Member Frodo_Baggins's Avatar
    Join Date
    Feb 2004
    Location
    Sao Paulo, Brazil
    Posts
    397

    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?

  2. #2
    New Member
    Join Date
    May 2003
    Location
    Detroit
    Posts
    6
    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
  •  



Click Here to Expand Forum to Full Width