Author Topic: Sorting out which device is connected to which port...  (Read 9546 times)

GlennP

  • Frequent Contributor
  • ****
  • Posts: 141
Sorting out which device is connected to which port...
« on: December 13, 2013, 10:39:43 am »
Just doing some mods to some base code in VB, and am looking for a way to tell which instrument is plugged into which port, the best idea I have so far come up with is to list all the ports and open them (two reply 9600, one 19K2 and the other at 1200) and send the Id request to them if the port will open at 19K2 I have one instrument, 1200 the other, then last two request ID command.  Is there a way of doing this more elegantly or is this the only way to do it?
Glenn   

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research

GlennP

  • Frequent Contributor
  • ****
  • Posts: 141
Re: Sorting out which device is connected to which port...
« Reply #2 on: December 13, 2013, 12:13:41 pm »
Thank Jan I will look at it Monday (it's late Friday this side of the Atlantic) also you might be interested an article I wrote for the CodeProject Web site
http://www.codeproject.com/Articles/678025/Serial-Comms-in-Csharp-for-Beginners , there probably is more than a few similarity's to some of your examples. (quaking as he types!) please if you think it suitable link to it....   

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Sorting out which device is connected to which port...
« Reply #3 on: December 13, 2013, 03:03:47 pm »
Nice! I'll add a link in my next website update.