03-18-2009 01:17 AM
Solved! Go to Solution.
03-18-2009 04:06 PM
Hey CraigByrd,
What NI hardware are you using? What driver and version do you have installed? What else does your application/code do other than calling ibdev subsequently?
03-19-2009 08:16 AM
Craig,
If you continue to open a device handle using ibdev, it will eventually run out of handles, as described in the KnowledgeBase article called Why Do I Get iberr EDVR(0) after UD1023.
There are a couple of solutions that are listed in the article. One solution is to call ibdev only once at the beginning of your application and use that given handle for the rest of the calls.
The other solution is to call ibonl(ud, 0) to close the handle when you are finished with it. This is common problem when you are in a loop that continually calls ibdev at the beginning of the loop but it does not call ibonl(ud, 0) at the end of the loop.
Hope this information helps.
gpibtester
03-19-2009 11:17 AM
Thank you, I appreciate the information.
03-19-2009 11:21 AM
Thank you for your response. Regarding ibdev(), I have moved the function call so as to only run it one time for the application, unless a gpib error requires any subsequent initialization.
03-19-2009 01:24 PM
Craig,
I am glad to hear that the information helped you!
Another good programming practice is to close the handle using ibonl(ud, 0) when your application exits.
Regards,
gpibtester