Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

device handle allocation

I am currently using driver NI-488-2 version 2.4. Does this automatically allocate device handles and if so how can I turn this off.
The reason that I am asking is that I have an old VB code that allocates it's own d.h.'s and I do not want to have to rewrite this code.
 
Thanks,
 
Neil.
0 Kudos
Message 1 of 7
(3,598 Views)
Neil,

The v2.4 driver uses the same(or very similar) method for device handle allocation as previous drivers.  I'm not sure what you mean when you say that your old VB code allocates it's own device handles.  If your VB code worked with a previous NI-488.2 driver on a Win32 platform, it should continue to work with the new driver.  Is there a specific issue that you're running into?

Craig A.
National Instruments Engineer
0 Kudos
Message 2 of 7
(3,573 Views)
Hi Craig,

Basically,

2 weeks ago we were happily running a VB code to control data transfer from a wind tunnel using the AT-Gpib/TNT P&P card. There was then a power shutdown that messed up the c:. We have since been putting everything back on the drive bit by bit because the ghost didn't work. We got the NI 488-2 V2.4 from NI site and ran the code again. It isn't working anymore though. Using spy I saw the ehdl (23) error repeatedly coming up. Someone else in the department suggested that the driver allocates handles automatically and the software calls its own handles using ibconfig32. (I am a total beginner so don't know but ibconfig32 is definately in the program). Our guess was that the driver used before the crash was probably an older one which did not automatically handle the devices. I have emailed someone in NI software for version 1.7 hoping that this was the existing driver before the crash. As I say I am learning from zero so would appreciate any comments you have.

Neil.
0 Kudos
Message 3 of 7
(3,570 Views)
Is there any chance you can post your NI-Spy log here?  Are you getting an EHDL error from ibfind or ibdev, or is it from a subsequent call? 

Craig A.
National Instruments Engineer
0 Kudos
Message 4 of 7
(3,540 Views)
I was getiing the error from ibfind. I have now installed V1.7 and that error is gone but there is a new one.
 
in Spy
 
ibclr(GBIB0) 0x8128 EARG(4) 0X0000
 
I'm not sure yet whether or not this error effects my data collection.
 
Thanks,
 
Neil.
0 Kudos
Message 5 of 7
(3,509 Views)
Neil,

Can you please post the full NI-Spy logs from both 1.7 and 2.4?  Having an EHDL error in 2.4 is very similar to having a EARG error in 1.7.  EARG indicates a bad argument to a function.  We added the EHDL error code in 2.0 to specify a bad board or device handle passed to a function.  It looks like the application is trying to use a board handle(gpib0) for a device-level call(ibclr).  It is certainly possible that the application has had this problem the entire time, but moving to a new system somehow exposed the problem.  Without the full Spy capture, it is difficult for me to get a full picture of what is happening with your system. 

Craig A.
National Instruments Engineer
0 Kudos
Message 6 of 7
(3,500 Views)

Hi,

V1.7 & V2.4 captures attached. In both cases the data system seemed to capture data (it was a simulated run so I can't check if it did) but I know that definately V2.4 didn't from experience. Sometimes it crashes with an overflow error in V2.4, hasn't happened yet with V1.7.

I had to save th efiles as .txt to be saved on the site but they are .spy files.

 

Thanks,

 

Neil.

Download All
0 Kudos
Message 7 of 7
(3,493 Views)