Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing plots using GPIB-Equipped PC

I would like to write a visual basic program to make the PC pretend to be a GPIB printer.

Using Visual Basic, I can send commands to the spectrum analyser and get back simple pieces of information such as the marker frequency. But I have not been successful in getting the spectrum analyser to print to my PC via the GPIB.

I believe that what I have to do is send the print screen command to the spectrum analyser, then tell my PC's GPIB card to stop being a controller and start being a listener and then set its GPIB address to that which the spectrum analyser expects for the printer and then read in the data. When that is all done, I have to switch the PC back to being a controller.

Sample code in any language that shows
an example like this would be appreciated.

In this case the spectrum analyser is a HP/Agilent 8594E but code example for any HP spectrum analyser would be appreciated.

Also if anyone has a generalised GPIB print capture program that lets the PC pretend to be a GPIB printer and capture the print out to disk that would be helpful too. Either compiled or source code.

Thanks
0 Kudos
Message 1 of 2
(3,630 Views)
Hello Xerxes,
Many instruments provide GPIB command(s) to setup and initiate a hardcopy or print screen operation. The details vary by instrument, but in general you
could SEND the command(s) to start the hardcopy and then do an IBRDF to read in the data and save it to a file. Of course, the data is in a format specified by the device and so you may need to parse it, but this should be simple with the manual on hand.

I hope this helps you out!

Aaron K.
Application Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,630 Views)