78
Chapter 2
Programming Fundamentals
Improving Measurement Speed
Improving Measurement Speed
There are a number of things you can do in your programs to make
them run faster:
“Turn off the display updates” on page 78
“Use binary data format instead of ASCII” on page 78
“Minimize the number of GPIB transactions” on page 79
“Consider using USB or LAN instead of GPIB” on page 80
“Minimize DUT/instrument setup changes” on page 80
“Avoid automatic attenuator setting” on page 80
“Avoid using RFBurst trigger for single burst signals” on page 81
“N9071A: Optimize your GSM output RF spectrum switching
measurement” on page 82
“Making power measurements on multiple bursts or slots? Use
CALCulate:DATA<n>:COMPress?” on page 82
Turn off the display updates
:DISPlay:ENABle OFF
turns off the display. That is, the data may still
be visible, but it will no longer be updated. Updating the display slows
down the measurement. For remote testing, since the computer is
processing the data rather than a person, there is no need to display the
data on the analyzer screen.
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
your numerical 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:BORDer SWAP
to change the byte order so that the least
significant byte is sent first. (Real,32 which is smaller and somewhat
faster, should only be used if you don’t need full resolution for your
data. Some frequency data may require full 64 bit resolution.)
When using the binary format, data is sent in a block of bytes with an
ASCII
header. A data query would return the block of data in the
following format:
#DNNN<nnn binary data bytes>
To parse the data: