I've encountered some interesting problem on our customer's computer (ATE environment). The computer is connected with GPIB (using NI PCI-GPIB card) to our instrument and to an IC handler. Somehow the handler, or the handler software in the computer, causes the gpib driver or hardware to get into a mode where the REN signal is not asserted automatically with ibclr or ibwrt commands. The sequence looks like:
[Handler software]
.
.
[Our instrument software]
ud = ibfind("DEV6");
ibonl(ud, 1);
ibtmo(ud, T3s);
ibeos(ud, 0);
ibeot(ud, 1);
ibclr(ud);
ibwrt(ud, cmd, strlen(cmd));
Under normal circumstances (for example - without the handler) the ibclr should cause REN to be asserted but in this case it does not. I managed to work around the problem by adding between the handler software and our instruments software the following lines:
ud = ibfind("GPIB0");
ibrsc(ud, 1);
ibsre(ud, 1);
ibonl(ud, 0);
This works but it requires our software to know the name of the GPIB interface ("GPIB0" in this case). Currently our software is given by the user only the instrument identification string ("DEV6" in this case).
My main question: How can the handler software or hardware prevent the NI driver (or hardware) from asserting REN?
Another question: Is there a way to get a board handle or ID from a device handle or ID?
Thanks.