Debbie,
The idea behind my suggestion is that you retrieve the serial number after you open the device. You are correct in your assumption that GetDeviceInfo will return “Device not open” if called on an okCFrontPanel instance that is not attached to an open device, but you can call OpenBySerial with NULL input in C++ (use an empty string for other languages) and it will simply open the first FrontPanel-enabled device it finds that is not already open.
To sum up, if you have an array of FrontPanel-enabled devices that you want to monitor, you can:
-Check to see if the device is still open by calling IsOpen() on it
-If the device is not open, verify there is a device to open by checking GetDeviceCount()
-If there is a device to open, open it using OpenBySerial() with no parameters (empty string for languages other than C++)
-Get the serial number by populating the okTDeviceInfo struct
This process should get you where you need to go. For further information about the FrontPanel methods, refer to the API reference pages at FrontPanel API: Overview
Cheers,
okAlex