Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read the trace data from Agilent(HP)8510C in C++ using NI488.2 and PCI-GPIB ?

Hello! I am trying to develop an application in C++ for measurements with Agilent(HP) 8510C network analyser using NI488.2 and National Instrument's PCI-GPIB card. In HPBASIC the trace data is read using OUTPDATA command which contains PREAMBLE, SIZE and then the data string in real and imaginary pair for the required points. The ibrd function gives data only for one point. Kindly guide me how I can read the whole trace and and separate out the real and imaginary data values. Regards, kapil
0 Kudos
Message 1 of 2
(3,852 Views)
Hey Kapil,

It seems that in HPBASIC you were using an instrument driver for the 8510C. OUTPDATA is not a native HPBASIC function. National Instrument has similar instrument drivers for LabVIEW and CVI.

http://zone.ni.com/idnet97.nsf/9b2b33e1993d877786256436006ec498/7b235254f3881ddb862568ab005fbd2e?OpenDocument

http://zone.ni.com/idnet97.nsf/9b2b33e1993d877786256436006ec498/24ca7db880ab78ae862568ab005fbc0f?OpenDocument

For example in the CVI instrument driver you will find a source file called hp8510.c. In the source code you will find a function called hp8510c_dataInRaw that sounds similar to the function that you described.

Note that this example is designed for CVI, but it is possible that you could extract the information you need for C++. If
you had a copy of CVI you could just add the files downloaded from the instrument driver to a project and then compile and run the project. It already contains a ready to run example that allows you to capture data and use your instrument.

If you want try CVI you can download an evaluation copy on-line at http://ni.com/lwcvi/launch.htm.

I hope this helps out,

JoshuaP
National Instruments
0 Kudos
Message 2 of 2
(3,852 Views)