LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ibdev error 32768

And I'm a wonderin' about another CVI library issue too ....

 

When I call ibdev in an app that doesn't have the NI gpib dll available, I get a popup in debug mode telling me about this, and dev descriptor is returned as 32768 (!?), not a negative number as the function help says !?  It looks like it's trying to return an 8000 hex indicating GPIB error as in ibsta maybe?   The returned value (normally a device handle) isn't a short, it's an int per the function help?

 

So should I check for an int value of 32768 and pretend it's a negative number?

 

Menchar

0 Kudos
Message 1 of 2
(3,829 Views)

This is a bug in ibdev, ibfind, OpenDev, CloseDev, and CloseInstrDevs. If the GPIB driver is not installed, these functions should be returning negative values according to the documentation, but instead they return 0x8000 (the ibsta value indicating that an error occurred). We will fix this. You can workaround this by checking if the return value is 0x8000 (ERR), and if so, check the value of iberr. You can also ignore the return value, and just check if ibsta has the ERR bit set after the function returns.

0 Kudos
Message 2 of 2
(3,810 Views)