04-01-2008 06:07 PM - edited 04-01-2008 06:10 PM
I call following functions in VB6 to initialize my device
ieee = ilfind("GPIB0")
devHandle = ildev%(0, 22, 0, 12, 1, 0)
I expected that devHandle gets -1 if device at address 22 can't be accessed. I was suprised that devHandle always returns valid positive value. I tried power off the device, then I unplugged GPIB cable but I never get -1. I even changed board index from 0 to 1, to 2, to 3. Only with board number=4 I received devHandle=-1. Am I doing anything wrong or it works as supposed to be.
Thanks
04-02-2008
07:43 PM
- last edited on
10-22-2025
10:51 AM
by
Content Cleaner
04-07-2008
08:49 AM
- last edited on
10-22-2025
10:51 AM
by
Content Cleaner
Alex,
Calling ildev simply opens a handle to a device, it does not check the device to see if it is actually present or not. If you wanted to check to see if the device at Primary Address 22 is there, try using illn (or the C like ibln) to detect if it is on the bus or not.
BTW- using il-style calls in Visual Basic is the preferred set of calls to use. They mimic the behavior of the C like ib-style calls. If anything, the article in the KnowledgeBase needs to be updated.
Hope this information helps!
gpibtester