Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Only 32 ibdev calls allowed between system reboots.

I am programming an AT-GPIB/TNT card on a PC under DOS. When used in the factory, the program is stopped and started many times per day, but it fails after 8 runs. I have a trivial test case which shows that you can only call ibdev 32
times without rebooting the PC, even if the program has been properly shut down, and the relevant device cleanly taken off line in the meantime. This is causing us serious problems.
0 Kudos
Message 1 of 4
(3,283 Views)
If you are making a call to ibdev in your program, you also need to place the device offline with an ibonl function before ending the program. The 32 should correspond to the limit number of devices that can be opened with ibdev at one time. Once all 32 references are taken your program would result in an error. The call should be similar to:
ibonl (ud,0);

Chris D
Applications Engineer
National Instruments
Message 2 of 4
(3,283 Views)
But I do call ibonl(ud,0), and it still fails. I have an utterly trivial testcase, which opens one device, then takes it offline (with ibonl(ud,0)), then takes the card offline (ibonl(0,0)), then stops cleanly. I can call this program 32 times. On the 33rd attempt the ibdev call fails. If I open more devices (and close them), it fails earlier. Test case is attached.
0 Kudos
Message 3 of 4
(3,283 Views)
This was a user error, I was using the device address in ibonl, instead of the device descriptor.
0 Kudos
Message 4 of 4
(3,283 Views)