Contents
5
1. Introduction to Programming X-Series Applications
What Programming Information is Available? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Using Embedded Help for Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Using the Help System on Your PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Help System Features Especially Useful for Programmers . . . . . . . . . . . . . . . . . . . . . . . 10
Communicating SCPI Using Telnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
SCPI Measurement Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Measurement Group of Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Common Measurement Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
STATus Subsystem (Remote Only Commands) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
:STATus Subsystem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
:STATus Subsystem Commands and Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2. Programming Fundamentals
SCPI Language Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Command Keywords and Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Creating Valid Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Special Characters in Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Parameters in Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Putting Multiple Commands on the Same Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Improving Measurement Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Turn off the display updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Use binary data format instead of ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Minimize the number of GPIB transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Consider using USB or LAN instead of GPIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Minimize DUT/instrument setup changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Avoid unnecessary use of *RST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Avoid automatic attenuator setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Avoid using RFBurst trigger for single burst signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
N9071A: Optimize your GSM output RF spectrum switching measurement . . . . . . . . . 82
Making power measurements on multiple bursts or slots? Use CALCulate:DA-
TA<n>:COMPress? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
For More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
For More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
3. Measurement Synchronization with LXI-B
IEEE 1588 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Synchronizing Time on the MXA and MXG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Verifying Time Synchronization on the MXA and MXG . . . . . . . . . . . . . . . . . . . . . . . . 86
Peer to Peer Messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
MXA Instrument Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Outputting LAN Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87