Hello,
I have an application that controls a HP/Agilent 8753 Network Analyzer over the GPIB. I am now trying to convert this to use the NI series of GPIB interfaces, using a borrowed AT-GPIB/TNT (PnP) card for development purposes.
Using the Multi-Device calls, everything is fine until I try to Send a string that has embedded double-quotation marks (eg to send a title string to the instrument). As soon as I do this it fails with a timeout, either immediately or on the next call to Send. With the Send function, I pass the string length (without the trailing '\0') as the 4th parameter, and use NLend. When Send returns, ibcntl is one more than the original string length (ie the string length with the appended newline).
I have attached a code fragment (in C, with hard-coded parameters and without the checks on ibsta) at the end of this posting. As you can see, there are several GPIB calls before the call to set the title string - all of these calls return correctly, with the instrument behaving as expected.
Observations:
* The application works fine with a legacy Hewlett-Packard 82335B card using HP-IB Tools Rev B.00.00.00 (through a home-brewed DDE server to manage the 32/16-bit interfacing).
* It also works fine with a CEC488 PCI card, using native CEC function calls and their IEEE_32M DLL.
* It fails with the NI card, using the Multi-Device calls from NI488.2 2.2. This happens both when I access the NI GPIB-32 DLL functions indirectly through LoadLibrary, and when I include BorlandC_gpib-32.obj into my project.
* It also fails if I switch back to the CEC card, but use NI function calls with their compatible GPIB-32 DLL (Ver 5.14.0.0). I have only tried this with indirect (LoadLibrary) calls to the DLL.
Hardware & BIOS changes:
* Used a shorter GPIB cable - no improvement.
* Changed BIOS PCI IDE BusMastering from Disabled to Enabled - no improvement.
* Changed BIOS DMA 5 Type from Normal ISA to PC/PCI (Device Manager shows the card is using DMA 05) - no improvement.
Development platform:
* Borland C++Builder 5 Standard, running in debug mode.
* Windows 98 SE.
* Pentium 550.
* AMI BIOS V2.5 1997
Everything I have tried so far suggests that the Send function does not like to transmit embedded double-quotation marks.
One thing I have not yet tried is to use the Traditional calls instead of the Multi-Device calls.
Any ideas ?
TIA,
Bill
SendIFC( 0 );
Send( 0, 16, "IDN?;", 5, NLend );
Receive( 0, 16, inbuf, 256, STOPend );
Send( 0, 16, "OPC?;PRES;", 10, NLend );
Receive( 0, 16, inbuf, 256, STOPend );
Send( 0, 16, "OUTPERRO;", 9, NLend );
Receive( 0, 16, inbuf, 256, STOPend );
Send( 0, 16, "HOLD;", 5, NLend );
Send( 0, 16, "S21;", 4, NLend );
Send( 0, 16, "LOGM;", 5, NLend );
Send( 0, 16, "SCAL10;REFP10;REFV0;", 20, NLend );
Send( 0, 16, "CENT140.0000MHZ;SPAN50.0000MHZ;POIN801;", 39, NLend );
Send( 0, 16, "POWE6.0;", 8, NLend );
Send( 0, 16, "SWET3.000;", 10, NLend );
Send( 0, 16, "IFBW300.0HZ;", 12, NLend );
Send( 0, 16, "COROFF;", 7, NLend );
Send( 0, 16, "CONT;", 5, NLend );
Send( 0, 16, "TITL\"This does not work\";", 25, NLend );