AnsweredAssumed Answered

VRF- gpib DLL and DirectI/O

Question asked by VRFuser on Mar 4, 1998
Hi all

Am relaying this issue from a local user. User is attempting to communicate
with an instrument using a combination of a vendor DLL and Direct I/O
from within VEE. Seemingly straightforward, however, what happens
is that after calling a DLL the Direct I/O is unable to talk to the
instrument.

About the closest I have personally seen was with a DLL for a GPIO card,
wherein it was necessary to specifically release control of the
GPIO card at the end of the DLL call in order for VEE to continue.

Specific details are given below- hopefully enough of an excerpt such that
someone might recognize the symptoms/cure.

any hints would be greatly appreciated.

thanks

Stan Bischof
rsb@sr.hp.com




************************************************************************

I believe I have a handle on what the problem is between VEE and the
National Instruments card.  (ref. Ecal_rf.23).  The problem is with
the Direct I/O function within VEE.   If I use this function, I indeed
get quite a nasty error after using the SPI.  If I load the national
instruments driver (GPIB32.DLL) directly and make calls into it
instead of using Direct I/O, the error does not occur.  My suggestion
is
not to use Direct I/O, but to load national instruments DLL and use it
directly.

As a review, the following VEE sequence produces the error noted in
Ecal_rf.23:

1.     Direct I/O: send "S22;" to analyzer
2.     Import library stdspi.dll
3.     Call function stdspi.Config(2,0,16,1)
4.     Call function stdspi.Sens_Corr_Coll_Meth("FULL")
5.     Call function stdspi.Sens_Corr_Coll_Acq("A")
6.     Call function stdspi.Sens_Corr_Coll_Save(5)
7.     Direct I/O: send "PHAS;" to analyzer

The software gives a 'SERIOUS ERROR' during step 6.


The following VEE sequence does not produce the error:

1.     Import Library GPIB32.DLL
2.     Import Library stdspi.dll
3.     Call function GPIB32.ibfindA("DEV16")
4.     Call function GPIB32.ibwrta("S22;")
5.     Call function stdspi.Config(2,0,16,1)
6.     Call function stdspi.Sens_Corr_Coll_Meth("FULL")
7.     Call function stdspi.Sens_Corr_Coll_Acq("A")
8.     Call function stdspi.Sens_Corr_Coll_Save(5)
9.     Call function GPIB32.ibfindA("DEV16")
10.     Call function GPIB32.ibwrta("S12;")

I think the key is in step 9.  Since I am calling GPIB32 functions
directly, I can re-establish the connection to the network analyzer.
  I could not find the equivalent VEE function.  It is somehow buried
in the Direct I/O command.

Just for further reference, I also wrote the following VEE sequence.
It gave me an error and I didn't use the SPI.  Steps 2 thru 4
basically simulate what the SPI does.

1.     Direct I/O: send "S22;" to the analyzer
2.     Import Library GPIB32.DLL
3.     Call function GPIB32.ibfindA("DEV16")
4.     Call function GPIB32.ibwrta("S11;")
5.     Direct I/O: send "S21" to analyzer

The software gave an error on step 5.  The error was slightly
different, but it was still an error.


Outcomes