Results 1 to 4 of 4

Thread: Serial communications

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    8

    Serial communications

    Can anyone give me some tips on how to pull data off an external device through a PC COM port into VB .NET? The external device is an Omega datalogger. VB 6 had a communications ActiveX control (mscomm32.ocx) but I can't find anything similar in .NET???

    Thanks

  2. #2
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    For as far as I know, there is no functionality in VB.NET for serial communications. I guess they forgot it.
    However, you can still use the old MS com ActiveX control (mscomm32.ocx).

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    8
    Do you happen to have some sample code you could post that involves retrieving the data from the device at the On Comm event and storing it into a string for use in VB?

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    I dont have any code, but without any kind of thrid pary control, it will be more difficult since there is no native easy to use control for this. It would involve using IO streams sort of like you used to have to do with the open statement before there was the MS comm control. But I really havent been able to find any more info than that

    Probably something like
    System.IO.STreamReader("COM1").Open

    that is more than likely incorrect, but it maybe a start worth looking into.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

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