PORTS Forum
Ports and Interfaces => Serial Ports => Topic started by: GlennP 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
-
You could try this:
http://stackoverflow.com/questions/4500027/get-the-device-name-connected-to-the-serial-port
-
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....
-
Nice! I'll add a link in my next website update.