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: