Jump to content
  • 0

Question on the index used in FDwfDeviceOpen(int idxDevice, HDWF *phdwf)


rjratnip

Question

Hi,

I'm trying to understand the idxDevice value in the FDwfDeviceOpen() function. The documentation says it is a 0-based value for the devices, so I assumed if I only have one device connected then the idxDevice would be 0. But, if I specify 0 then no devices get opened. I ran a loop from 0-255 for the index, and it found no devices. If I specify the -1 value for "open all devices", then the device gets opened. One reason I want the index is for using the FDwfEnumDeviceIsOpened(int idxDevice, int *pfIsUsed) function so I can tell if the device is already opened for managing multiple measurements in my software. I prefer not to keep opening and closing devices as it takes some time to do this. Can you explain how to determine what the value for this index should be for my device? Is there a way I'm not seeing to determine the index of a device that is opened?  I'm using a Analog Discovery 3 device.

Thank you.

Robert 

Edited by rjratnip
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...