07-17-2009 12:33 PM
Hey, hope it's the right place to place this question of mine.
I'm using the agilent 4411b spectrum analyzer and controlling it via gpib.
My problem is , when I'm trying to read the trace data it usually about 450ms for the whole round-trip process, which is quite slow for my project demands.
I tried to read the data in binary form of only 401 bytes and it's still takes about the same time to recive the data back to my program so I guess the problem is with the latency of the gpib protoco...?
Does anyone encountered that kind of a problem and know how to solve it?
07-20-2009 06:40 AM
Hi,
The time required isn't due to gpib issues, it's probably due to the integration time required to measure the all the data.
What is your start frequency and span?
If the start frequency is low (<100 Hz) it simply takes a long time to process data at those frequencies.
Curt
07-21-2009 12:49 PM
the start freq is about 500mhz and the span is 100mhz
but even with a span of 20mhz it's still quite slow.
It usually take the spectrum to analyze the entire bw in about 4ms when, it only frezzes for a moment when I try to read data from it using the command "TRA?;"
07-21-2009 02:23 PM
Hi,
Can you post some of your code?
Curt
07-21-2009 02:57 PM
It basically look like this:
using NationalInstruments.NI4882;
.
.
.
Device dev = New Device(0,16);
.
.
.
dev.Write("TRA?;"); // ask for the trace data
string str = dev.ReadString();
.
.
.
I tried to read a byte array insted of a string, but nothing helps, it looks like the reading stucks the spectrum itself 😞
07-22-2009 07:29 AM
Hi kanko,
If the issue is related to the NET Gpib library then try using these commands
GpibDevice.TerminateReadOnEndOfString = True
GpibDevice.ReadString()
More than likely it's an issue with the device
You should reference the Agilent user manual.
Here's a few ideas
1 - Turn off the display, that increases measurement time
2 - Read the data in binary format
From the Agilent manual
Use binary data format instead of ASCII
The ASCII data format is the instrument default since it is easier for people to
understand and is required by SCPI for *RST. However, data input/output is faster
using the binary formats.
:FORMat:DATA REAL,64 selects the 64-bit binary data format for all yournumerical data queries. You may need to swap the byte order if you are using a PC
rather than UNIX. NORMal is the default byte order. Use :FORMat:BORDerSWAP to change the byte order so that the least significant byte is sent first.
I've used other Agilent analyzers and you'll need to pay careful attention to the byte order.
You might want to try an instrument driver
This one might work. It's for an hp 8590 analyzer, but I think the commands should work.
Sorry I couldn't be more help
Curt