Rohde & Schwarz Instrument Remote-Control Examples

repository·main·Indexed 41 days ago

https://github.com/rohde-schwarz/examples

A collection of ready-to-use remote-control example scripts and projects for Rohde & Schwarz instruments. Supports Python and C# using packages such as RsInstrument, RsNgx, and instrument-specific ScpiPackages. Includes specialized tools like the PAM-N Signal Integrity Automator for R&S RTP oscilloscopes and Excel macros for PLL jitter transfer function measurements using SMA100B and FSWP instruments.

Tokens
2.1K
Snippets
4
Records
16
Agent score
51%

What's inside Rohde & Schwarz Examples

  1. Overview of Rohde & Schwarz instrument remote-control examples

    main
    This repository contains ready-to-use example code scripts and projects for remote-controlling Rohde & Schwarz instruments. The examples are organized by programming language and the specific remote-control package used to interface with the hardware.
  2. C# remote-control package categories

    main

    C# examples in this repository are categorized based on the driver or communication package used:

    • RsInstrument: Uses the C# NuGet package for plain SCPI communication.
    • RsXXX_ScpiPackage: A dedicated instrument-specific ScpiPackage providing SCPI auto-completion and helpers.
    • RsXXX_dotNet_InstrumentDriver: Examples that utilize IVI.NET instrument drivers.
  3. Python remote-control package categories

    main

    Python examples in this repository are categorized based on the communication package used:

    • RsInstrument: Used for plain SCPI (Standard Commands for Programmable Instruments) communication.
    • RsXXX_ScpiPackage: A dedicated instrument-specific ScpiPackage that provides SCPI auto-completion and helper functions for easier instrument control.
  4. Configure environment and framework requirements for RsNgx

    main

    Before running the RsNgx remote-control instrument driver examples, ensure your environment meets these requirements:

    VISA Requirements: You must have one of the following installed:

    • R&S VISA 5.12+
    • NI VISA 18.0+
    • Or no VISA installed at all (if using alternative communication methods).

    Target Frameworks: Your project must target one of the following:

    • .NET Framework 4.5+
    • .NET Standard 2.1+
    • .NET Core 3.1+
  5. Install the RsInstrument NuGet package

    main

    The RsInstrument NuGet package is not included in the repository and must be restored manually via NuGet. Use one of the following methods depending on your Visual Studio version:

    Method 1: Visual Studio Professional (GUI)

    1. Navigate to Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution...
    2. Look for the yellow warning message indicating missing packages.
    3. Click the Restore button at the top right of the window.

    Method 2: Other Visual Studio versions (Package Manager Console)

    1. Open the console via View -> Other Windows -> Package Manager Console.
    2. Run the following command to reinstall the package:
    Update-Package -Id RsInstrument –reinstall
  6. Install and run the PAM-N Signal Integrity Automator

    main

    The PAM-N Signal Integrity Automator is a tool for automated signal integrity analysis of Automotive Ethernet PAM-N signals using an R&S RTP oscilloscope. It provides a GUI to automate signal configuration, eye diagram setup, and jitter decomposition.

    Prerequisites

    • Python 3.10 or higher
    • RsInstrument library
    • Tkinter (included with standard Python on Windows)

    Installation

    Install the required dependency via pip:

    pip install RsInstrument

    Running the Application

    Launch the graphical interface by running the main GUI script:

    python PAM_AE_SignalIntegrity_GUI.py
    pip install RsInstrument
    python PAM_AE_SignalIntegrity_GUI.py
  7. Connect to an R&S RTP Oscilloscope

    main

    To use the tool, you must establish a network connection to your R&S RTP oscilloscope via TCPIP/VISA.

    1. Ensure the oscilloscope is on the same network as your PC.
    2. Retrieve the instrument's IP address from the oscilloscope: Setup → Network.
    3. In the application, navigate to the Connection tab.
    4. Enter the IP address and click Connect.

    Note: The default pre-filled IP is 10.103.34.23 and must be updated to match your specific instrument.

  8. Prerequisites for RsInstrument C# examples

    main

    Before using the RsInstrument remote-control module examples, ensure your environment meets the following requirements:

    • VISA Driver: Install R&S VISA 5.12+ (download) or NI VISA 18.0+.
    • Runtime: Your project must use .NET Core 3.1+.
    • Package Compatibility: The RsInstrument NuGet package supports .NET Framework 4.5, .NET Framework 4.8, .NET Standard 2.1+, and .NET Core 3.1+.
  9. Build a standalone executable with cx_Freeze

    main

    You can package the tool into a standalone .exe so it can be run on machines without Python installed. This uses the setup.py file provided in the repository.

    1. Install cx_Freeze:
    pip install cx_freeze
    1. Build the executable:
    python setup.py build

    The resulting executable SignalIntegrityAutomator.exe and its dependencies will be located in the build/ folder.

    pip install cx_freeze
    python setup.py build
  10. Prerequisites for using RsInstrument in C#

    main

    Before using the RsInstrument remote-control module in your .NET projects, ensure the following requirements are met:

    • VISA Implementation: Install R&S VISA 5.12+ (download here) or NI VISA 18.0+.
    • Runtime: Your project must use .NET Core 3.1 or higher.
    • Package Compatibility: The RsInstrument NuGet package supports .NET Framework 4.5, .NET Framework 4.8, .NET Standard 2.1+, and .NET Core 3.1+.
  11. Configure Signal, Eye Diagram, and Jitter Analysis

    main

    The tool automates several measurement workflows:

    Signal Configuration

    • Channel Pairs: Select between CH1+CH3 or CH2+CH4 to automatically create a DIFF1 differential signal.
    • Presets: Select technology presets for 2.5 / 5 / 10 GBASE-T1.
    • Scaling: Configure vertical and horizontal scaling.

    Eye Diagram Setup

    • Software CDR: Options for Whole eye, specific eye (Eye1/2/3), or a selected transition.
    • Hardware CDR: Uses CDR trigger lock with an optional zoom window. Zoom coordinates are configurable in nanoseconds. The window is automatically managed (removed and recreated) on each run.

    Jitter Analysis

    • Quick Start: Fully automatic mode where the instrument detects the bit rate and enables all components.
    • Manual Components: Allows selection of specific components: DDJ, RJ, TJ, DJ, PJ, DCD.
    • PAM-N Results: Provides transition-dependent histograms for all six PAM-4 rising transitions (0→1, 0→2, 0→3, 1→2, 1→3, 2→3).