Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting data from HPIB analyzer. It works for some Frequencies.

I am connected to a HPIB Analyzer using GPIB and CVI.
I use ibwrt and ibrd function to get the data from the Analyzer as given below.

//=========================
//Stops the current measurement in progess
sprintf(cmd, "ABOR;:INIT; *WAI\n");
ibwrt(Analyzer, cmd, strlen(cmd));
/*Returns the result of the calculation for the currently selected marker function*/
sprintf(cmd, "CALC1:MARK:FUNC:RES?\n");
ibwrt(Analyzer, cmd, strlen(cmd));
ibrd(Analyzer, String, 100);
/*Reads the data from the analyzer and stores it in a string */
//=========================

The above code works fine for one Frequency range
Start Freq: 100 Hz
Stop Freq: 6.4 KHz

Start Marker Freq: 1000Hz
Stop Market Freq: 6
000 Hz

But does not work for the below Freq or most of the Frequncies.
Start Freq: 100 Hz
Stop Freq: 1.7 KHz

Start Marker Freq: 200Hz
Stop Market Freq: 1000 Hz

When i start the Test Manualy on the Analyzer everything works fine. Only if i start the test using CVI and get back the data i am getting this error(which works for just one Frequency).

Any help would be appreciated.

Thanks.
0 Kudos
Message 1 of 2
(2,826 Views)
This question would be best answered by the instrument manufacturer, Agilent. From the GPIB/CVI side, you are only sending and receiving strings. The best question for you to ask them would be:
Given these frequencies:
Start Freq: 100 Hz
Stop Freq: 1.7 KHz
Start Marker Freq: 200Hz
Stop Market Freq: 1000 Hz
What commands do I need to send to my instrument and in what order do I need to send them?
0 Kudos
Message 2 of 2
(2,826 Views)