31SCPI Programming FundamentalsTechniques for Improving Measurement PerformanceTechniques for Improving Measurement PerformanceThis section describes several programming techniques that can improve speed and efficiency. Most, but not all, of thesetechniques relate to SCPI program design.• “Turn off Display Updates” on page 31• “Use Binary Data Format instead of ASCII” on page 31• “Minimize the Number of Bus Transactions” on page 31• “Use USB or LAN Connection instead of GPIB” on page 32• “Minimize DUT/instrument Setup changes” on page 32• “Avoid Automatic Attenuator Setting” on page 32• “Avoid using RFBurst trigger for Single Burst Signals” on page 32• “Optimize GSM Output RF Spectrum Switching Measurement (N9071A Measurement Application)” on page 33• “To make Power Measurements on Multiple Bursts or Slots use CALCulate:DATA:COMPress?” on page 33Turn off Display UpdatesWhen the instrument is being operated remotely, there is no need to display data on the instrument screen. Displayupdates slow down the measurement, so measurement speed may be increased by switching off updates.Send :DISPlay:ENABle OFF to turn off the display. In this case, data remains visible, but will no longer be updated.Use Binary Data Format instead of ASCIIThe ASCII data format is the instrument default, since it is easier for humans to read 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 numerical data queries. (The REAL,32 format,which is smaller and somewhat faster, should only be used if you do not require full data resolution. Some frequency datamay require full 64 bit resolution.)If you are using a PC rather than UNIX, you may need to change the byte order to little-endian, by sending:FORMat:BORDer SWAP. For details, see the "Programming the Analyzer" chapter of any X-Series Help file or Users &Programmers Reference PDF.When using the binary format, data is sent in a block of bytes prefixed by an ASCII header. For details of the block format,see “Block Program Data” on page 21.Minimize the Number of Bus TransactionsWhen you are using the GPIB bus for control of your instrument, each transaction requires driver overhead and bushandshaking, so minimizing these transactions reduces the time used.• You can reduce bus transactions by sending multiple SCPI commands per transaction. See “Writing MultipleCommands on the Same Line” on page 21.• When making the same measurement multiple times with small changes in the measurement setup, use the READcommand, which is faster than using INITiate and FETCh.• When changing the frequency and making a measurement repeatedly, you can reduce transactions by sending theoptional frequency parameter with the READ query (for example, READ:? {}). These optionalparameters are not available in certain modes, such as Spectrum Analyzer or Phase Noise.The CONFigure/MEASure/READ commands for some measurements allow you to send center frequency setupinformation along with the command (for example, MEAS:PVT? 935.2MHz). This sets the Power vs. Timemeasurement to its defaults, then changes the center frequency to 935.2 MHz, initiates a measurement, waits until itis complete and returns the measurement data.