Hi all,
i wrote a gui application in python which communicates with an xem6010.
I want to check the xem connection to avoid errors by trying to communicate with the xem if it is disconnected. I first tried to use the IsOpen function, but it always returns true, even if i unplug the xem. So i wrote a simple function that checks the connection using the GetDeviceListSerial function. So if the device list does not contain the serial of the connected xem, i know that it is disconnected. I don’t know if this is the recommended way to check the connection, but it works pretty good. But only on linux, so heres the problem:
When i start the application on windows(8.1) it immediatly reports that the board is disconnected. To find the error i started the python interpreter, imported ok and typed these commands (one xem6010 is connected):
xem = ok.FrontPanel()
xem.GetDeviceCount() // that returns 1 as it should
xem.GetDeviceListSerial(0) // it returns the serial
xem.OpenBySerial("serial")
xem.GetDeviceCount() // now it returns 0
xem.GetDeviceListSerial(0) // it returns an empty string
so as you can see this way to check the connection does not work on windows (on linux GetDeviceCount() returns always 1 and GetDeviceListSerial(0) returns the correct serial).
Does anyone know about this error or even a solution? Or maybe do you know a better way to check the connection?
jk