Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Emergency. problems in serial communication

Emergency. problems in serial communication

Scheduled Pinned Locked Moved C#
question
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wk_vigorous
    wrote on last edited by
    #1

    Hi, guys I use MSComm control to write a serial port communication routine. But the event "OnComm" don't response. And I have set RThreshold and SThreshold 1. It 's correct when I send out a character, the OnComm event should response, But it not. What do u think of that? Expect some serial communication specialists' idea. Thank a lot vigorous

    H 1 Reply Last reply
    0
    • W wk_vigorous

      Hi, guys I use MSComm control to write a serial port communication routine. But the event "OnComm" don't response. And I have set RThreshold and SThreshold 1. It 's correct when I send out a character, the OnComm event should response, But it not. What do u think of that? Expect some serial communication specialists' idea. Thank a lot vigorous

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      This has nothing to do with serial communications (unless, of course, the serial device is not responding); it has to do with the COM control (it's receiving data and firing events). Make sure you've attached an EventHandler to the MSComm.OnComm event:

      msComm1.OnComm += new EventHandler(this.OnComm);

      If you haven't attached an event handler, your event handler will not be fired (it's a callback). For more information about interop'ing the MSComm control, read http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=320[^] from a dev site I haunted long ago.

      Microsoft MVP, Visual C# My Articles

      N 1 Reply Last reply
      0
      • H Heath Stewart

        This has nothing to do with serial communications (unless, of course, the serial device is not responding); it has to do with the COM control (it's receiving data and firing events). Make sure you've attached an EventHandler to the MSComm.OnComm event:

        msComm1.OnComm += new EventHandler(this.OnComm);

        If you haven't attached an event handler, your event handler will not be fired (it's a callback). For more information about interop'ing the MSComm control, read http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=320[^] from a dev site I haunted long ago.

        Microsoft MVP, Visual C# My Articles

        N Offline
        N Offline
        Nick Parker
        wrote on last edited by
        #3

        Heath Stewart wrote: from a dev site I haunted long ago Ah, the old days. :sigh: - Nick Parker
        My Blog | My Articles

        H 1 Reply Last reply
        0
        • N Nick Parker

          Heath Stewart wrote: from a dev site I haunted long ago Ah, the old days. :sigh: - Nick Parker
          My Blog | My Articles

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          Nick Parker wrote: Ah, the old days. :sigh: Are you nuts? :) DevHood wasn't very good. CodeProject is much better, despite the connection problems lately.

          Microsoft MVP, Visual C# My Articles

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups