LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the assignment criteria for instrument handles?

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

 

0 Kudos
Message 1 of 7
(4,019 Views)

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.

ColeR
Field Engineer
0 Kudos
Message 2 of 7
(3,990 Views)

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, 

S. Eren BALCI
IMESTEK
0 Kudos
Message 3 of 7
(3,985 Views)

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

0 Kudos
Message 4 of 7
(3,952 Views)

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.

ColeR
Field Engineer
0 Kudos
Message 5 of 7
(3,921 Views)
Cole, Thank you for the effort in researching this issue. There have not been any code changes, just a hardware update to a device in the system. Do you know if the HSDIO handle assignment is predicated on other handles that have been assigned?  Say, there are six HSDIO and two other devices (x) in the system and the order of initialization is: three HSDIO then two devices (x) then three HSDIO. Would the assignment of the last three HSDIO be affected by the two devices (x)?  Again thanks J

 

0 Kudos
Message 6 of 7
(3,901 Views)

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.

ColeR
Field Engineer
0 Kudos
Message 7 of 7
(3,861 Views)