# Example Programs for Common Oscilloscope Tasks, Old vs. New

Migration Guide

- Migration Guide
- SCPI Differences
- SCPI Similarities
- SCPI Command Subsystem Comparison
- SCPI Programming Tools
- Setting Up the Oscilloscope in SCPI Programs
- Synchronizing Analysis with Acquired Data in SCPI Programs
- Querying Measurement Results
- Querying Waveform Data
- Waveform Load/Save Format Support
- Debugging SCPI Programs
- Example Programs for Common Oscilloscope Tasks, Old vs. New

Included with the programmer's guide are example programs that perform common tasks in a real-time oscilloscope.

There is a "UXR" folder for examples that work in previous Infiniium oscilloscopes (like the UXR-Series oscilloscope) and there is an "XR8" folder for examples that work in newer Infiniium 2026 oscilloscopes (like the XR8 oscilloscope).

Files are named the same for programs that perform the same tasks. You can use a diff/compare tool like WinMerge to view the specific SCPI differences between earlier Infiniium and Infiniium 2026 programs.

(If an example program performs a task that can be done in one system and not the other, it will exist in only one of the folders.)

These example programs are located in the "C:\Program Files\Keysight\Infiniium\Help\examples" folder.

Examples for Common Oscilloscope Tasks
Example | Earlier Infiniium | Infiniium 2026 | Description
--- | --- | --- | ---
armed-status-check-methods.py | link | link | Checks the trigger system armed status using a few different methods.
basics.py | link | link | Performs initialization, default setup, autoscale, saving and restoring setups, measurements, screen capture, and saving waveform data.
default-setup.py | link | link | Performs default setup or factory default.
differential-channel-autoscale.py | link | link | Sets up a differential channel using two oscilloscope channels and autoscales the differential signal.
disk-file-read-ascii.py |  | link | Transfers an ASCII text file from the oscilloscope disk to the host computer.
disk-file-read.py | link | link | Transfers a binary file from the oscilloscope disk to the host computer.
disk-file-write.py | link | link | Transfers a file from the host computer to the oscilloscope disk
disk-operations.py | link | link | Uses :DISK commands to save and load setups, save screen images, save and load waveforms, save and load color grade/gray scale waveforms, save protocol listings, and move binary files from the oscilloscope to the host computer and back.
disk-screen-image-capture-autonumber.py |  | link | Save screen images to auto-numbered files.
error-check.py | link | link | Checks the error queue.
error-count.py |  | link | Checks the error queue more simply using the :SYSTem:ERRor:COUNt? query.
eye-setup-PAM4-w-equalization.py | link | link | Sets up a PAM-4 eye diagram and an equalized signal eye diagram. (Loads the waveform from PAM4_jitter_PRBS9Q.h5, so can be performed offline.)
file-save-complete-verify-methods.py | link |  | In Infiniium 2026, :DISK:WAVeform:SAVE does not return until it is complete. For large waveforms, you may need to increase the I/O timeout.
initialize.py | link | link | Clears status registers, reads the oscilloscope's ID string, and performs a default setup.
markers-tracking.py | link | link | Shows how to use tracking markers.
math-function.py | link | link | Turns on a math function.
measure-eye-height-check-status-get-results.py | link | link | Measures Eye Height, checks measurement status, and displays measurement results after 100 acquisitions. The UXR version does 100 :DIGitize acquisitions. The XR8 version uses acquisition limit test.
measure-eye-width-get-results-statistics.py | link | link | Measures Eye Width and displays measurement results and statistics.
measure-frequency-and-amplitude-get-all-results.py | link | link | Measures Frequency and Amplitude and displays all results from :MEASure:RESults?.
measure-frequency-and-amplitude-get-list-results.py |  | link | Installs Frequency and Amplitude measurements and displays results using the :MEASure:LIST commands.
measure-frequency-and-amplitude.py | link | link | Measures Frequency and Amplitude and displays individual measurement results.
measure-jitter.py | link | link | Performs jitter and noise analysis measurements. (Loads the waveform from Jitter_Noise.h5, so can be performed offline.)
pyvisa-test-and-idn.py | link | link | Prints the installed Python and VISA versions, checks the VISA environment, and opens a connection with the oscilloscope.
screen-image-capture.py | link | link | Captures a screen image.
synchronization-methods-blocking-and-polling.py | link | link | Shows two synchronization methods for real-time oscilloscopes.
waveform-cgrade-integer-data.py | link | link | Transfers binary eye data to the host computer and graphs the data in a matplotlib GUI window.
waveform-cgrade-xml-read-write.py |  | link | Reads binary color grade/gray scale data from a real-time eye source, loads it into a color grade/gray scale waveform memory, and saves the data to a .cgsi file.
waveform-data-WORD-format.py | link | link | Gets waveform data in 16-bit WORD format values.
waveform-data-all-analog-channels.py | link | link | Gets waveform data for all displayed oscilloscope channels in 16-bit WORD format. The UXR version uses indefinite-length binary block data transfer. Indefinite-length binary block data transfer is available on XR8 oscilloscopes when transferring float and double format data values
waveform-data-float-format.py |  | link | Gets waveform data in single-precision floating point (float) format using indefinite-length binary block data transfer.