Good afternoon all,
So, with multiple USBTMC instruments, how would one distinguish between them?
Is there a way that it could have some kind of fixed "index or address" like GPIB?
so, with two instruments:
...you see, these instruments would be "semi-hard-wired" to their test points...
Thank you, Santosh.
Keep in mind that the instruments get moved in and out of their locations...for calibration or whatever reason...
So, serial numbers will not stay in one place...
So, is there "another" way...?
I don't think there is a robust way like GPIB unless your USBTMC instruments have a way to configure a unique identifier (like GPIB address). You're at Windows' mercy and the order in which you plug in the instruments for the name they're assigned.
On the other hand, you can query the USB root hub the instrument is connected to from Windows but then you need to designate a specific physical USB port for that instrument.
That's the crux of plug and play. The only really distinguishable element is either the serial number or a user assigned identifier that you can give to the device (maybe). The GPIB address is in fact nothing different except that it is a required configuration to be able to communicate with the device.
With Plug and Play hardware everything to be able to talk to hardware is managed automatically but the Plug and Play mechanisme doesn't know and shouldn't know, that the device that is plugged into the upper right connector is for measuring voltage and the other same type plugged into the lower left connector is for temperature.
You will have to devise some procedure to manage that in some good way. Either have a part in your program where the user has to associate the devices to their function based on their serial number or if the device allows to have a user settable parameter such as an ID or name, to use that for this purpose. And anytime you startup your software and detect that the serial numbers have changed or the ID is not the expected one, since instruments have been swapped or replaced, request from the user to go through this association procedure again and refuse to continue until this has been resolved.
That is the unfortunate news. When you use something that has no nonvolatile address for the bus you connect to, you must prevent the swapping of device connections by physical barriers (locked cabinet, door access, a "Test in progress do notouch" sign etc....) or accept that the station is not robust and train the operator.
<Sea story> we had peal and place stickers that said do not touch. They had a split between the "t"s. When slightly misaligned the overlap generated an accidentally more appropriate message of either "do no touch!" or " do not ouch!" I liked those stickers 😄