I have written a small program to write to and read from an HP8563 spectrum analyzer. The operational portion of the code will eventually go into a much larger instrument control application. I am using a GPIB/ENET100 controller. The code is written in Borland C++ Builder 5.0.
The connection to the specan is good, since I can interact with it using ibic. MAX shows the controller with the proper settings.
My problem is that, after initialization, if I send a write command to the specan, it returns with an EDVR error. Below is a listing from NiSpy during the initialization and first ibwrt. The ellipses show breaks where the data is irrelevant or repetitive. Note the indent on line 47 is intentional. That is how NiSpy displayed it. I did not do this ibfind.
...
3 ibfind(GPIB2) 0x0130 0 0x0000
4 ibfind(GPIB2) 0x0130 0 0x0000
5 ibonl(2, 1) 0x0100 0 0x0000
6 ibrsc(2, 1) 0x0100 1 0x0000
7 ibsic(2) 0x0130 0 0x0000
8 ibsre(2, 1) 0x0130 0 0x0000
...
14 ibln(2, 0, NO_SAD(0), FALSE(0)) 0x0130 0 0x0000
...
31 ibln(2, 18, NO_SAD(0), TRUE(0)) 0x0130 0 0x0000
32 ibdev(2, 18, 0(0x0), T10s(13), 1, 0x0000) 0x0100 0 0x0000
33 ibln(2, 19, NO_SAD(0), FALSE(0)) 0x0130 0 0x0000
...
44 ibln(2, 30, NO_SAD(0), FALSE(0)) 0x0130 0 0x0000
45 ibdev(2, 18, 0(0x0), T10s(13), 1, 0x0000) 0x0100 0 0x0000
46 ibwrt(18), "cf?", 3(0x3)) 0x8000 EDVR(0) 0xE0140025
47 ibfind(GPIB18) 0x8000 EDVR(0) 0xE0140025
My code is attached. The functions/events in question are Initialize1Click and btnSendClick in Unit1.cpp and FindGpibAll and GPIBCmd in gpib.cpp. I have been trying to track this down for more than a week, now. Any help will be greatly appreciated. Thanks.