07-28-2009 04:27 PM
What I would like to know, is the criteria by which instrument handle values are assigned. As an example, the function niHSDIO_InitGenerationSession() returns a handle of a differenet value for each of the HSDIO devices in the system.
I am investigating an issue that has manifested as a conflict in handle assignments (two devices same handle value).
Thanks
J
07-29-2009 07:29 PM
Hello jap9711,
This is not something that is generally available and very well may be proprietary. I can not tell you for sure at this point, but I will see if i can find out anything different, but no promises. What would be helpful though is if you could detail your problem a little bit more fully where you are seeing this conflict of handles. Also, what version of CVI and HSDIO are you using as this will be needed information as well.
07-30-2009 12:03 AM
Hi Jap,
I have many PXI HSDIO devices in my test hardware, and I acquire handles for both acquisition and generation for all of them at the beginning of my application.
From my experience they seem to just increment each time you get a new handle, and they are not reassigned even if you discard them.
The handle values seems to reset to 0 (or 1, not sure) when you reboot the computer. But maybe there is another way of making it forget the discarded values so they can be reassigned.
In our case, this test equipment is used continiously and we never encountered such a "handle conflict" upto now.
Can you send the error code, message, etc that better defines the problem.
Regards,
07-31-2009 09:46 AM
The system is set with CV1 8.1 and HSDIO 1.5.3. Recently an issue was encountered where an HSDIO device at the end of the initialization list returned a handle above the 1000 range. Typically the values are less than 50. The instrument list is a mix of HSDIO and other devices with the HSDIO dispersed through out. In the past the handle assignments were consistent from one startup to the next.
J
08-03-2009 02:46 PM
Hello j,
Up to this point has this only happened once? I Opened and Closed a session handle multiple times in a for loop and see the session handles just incrementing by one each time. I can close the code and when I restart it see it start again at 0 and increment up (which is the behavior we expect with your statement "the handle assignments were consistent from one startup to the next.")
Has anything changed in your system when this manifested? Did your code change at all? Is there anything else you can offer to help us narrow down the problem? Thanks for any more help/clarification you can offer.
08-04-2009 12:52 PM
08-06-2009 04:39 PM
Hello j,
I have found that if the session handles are generated for any IVI class instrument, then the session handle for the Scope will increment as well. So in your example the handles for the first three would be successive numbers, then the next three would be three different (accounting for the two other instruments). So... 1,2,3,6,7,8. Hope this helps.