08-04-2022 05:02 PM
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:
USB0::0x05E6::0x2110::0000001::INSTR
USB0::0x05E6::0x2110::0000002::INSTR
...you see, these instruments would be "semi-hard-wired" to their test points...
Thank you
08-04-2022 05:17 PM
Probably query their SN
08-04-2022 05:24 PM
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...?
08-04-2022 05:27 PM
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.
08-04-2022 05:28 PM
darn...
thank you!
08-05-2022 03:35 AM
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.
08-05-2022 11:22 AM
Thank you, Rolf, for the very informative response and suggestion.
That's a good idea...
🙂
Cheers!
08-06-2022 06:03 AM - edited 08-06-2022 06:10 AM
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 😄