Multiple Devices

I would like to identify multiple devices using the user configurable ID string. According to the manual this should be simple by first calling the method GetDeviceCount and then GetDeviceListID. However, GetDeviceListID seems to be unavailable, it cannot be found in okFrontPanelDLL.h (I have checked h-files from both 2009 and 2012). The two other methods that works in the same way, GetDeviceListSerial and GetDeviceListModel, are available. Why is GetDeviceListID missing?

The Device ID cannot be read until the device is actually opened.

— Begin quote from Opal Kelly Support;3934

The Device ID cannot be read until the device is actually opened.

— End quote

Ok, I’m confused… So the User?s Manual is wrong?

“The GetDeviceCount() method also queries the device serial numbers, board types, and device ID strings of all the attached devices. This information can then be accessed by calling the methods GetDeviceListSerial(), GetDeviceListModel(), and GetDeviceListID(), respectively.”

Also in the example, the impression is that there is no difference in using the serial number and the device ID to open the correct device.

“It is expected that you would identify a specific board using the serial number (factory-assigned and not user-mutable) or using the device ID string (user configurable via FrontPanel).”

Our application is that we’ll build many systems which each have several XEM boards, one for each “sensor”. It would then be very convenient if “Sensor 1” had the same ID in all systems and this ID could be used to open that device. If the User?s Manual is wrong, any suggestion on a nice solution to this problem? Or do we have to open all connected devices first to find out the ID?

Thanks,
Kenny

Kenny–

Thank you for pointing this out. The User’s Manual is incorrect and we will update that. There is no method GetDeviceListID().

To do what you’re trying to do, the best method is to make a list of devices and their corresponding device IDs by opening them in succession. Once you have this, you can OpenBySerial().

If you’re curious why this is required… Serial numbers are a USB entity and are reported through the bus to the OS. Device IDs are an Opal Kelly specific item and can only be queried when a device is actually opened for communication. Due to OS inconsistencies, it isn’t reliable to query all Device IDs attached to the system because devices open in another process are no longer available to be opened.

Our DeviceChange sample might be helpful.

Neither GetDeviceListSerial nor GetDeviceListModel are listed in the API reference (AFAIK). The only way to use them is by looking at an example (fortunately it’s not too hard).