element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Tech Connection
  • Learn
  • Learning Center
  • Tech Connection
  • More
  • Cancel
Tech Connection
Blog How a Raspberry Pi Can Remotely Control an Oscilloscope
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Tech Connection to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
ADI-Webinar-Voyager4
Engagement
  • Author Author: pchan
  • Date Created: 18 Jun 2024 4:18 PM Date Created
  • Views 354817 views
  • Likes 10 likes
  • Comments 14 comments
  • tektronix
  • tech spotlight
  • oscilloscope
  • raspberry pi
Related
Recommended

How a Raspberry Pi Can Remotely Control an Oscilloscope

pchan
pchan
18 Jun 2024

Profile imageRemote control of oscilloscopes allows users to operate and monitor the functions of an oscilloscope from a distance using a computer or mobile device. This technology is especially beneficial in the new remote work culture and educational institutions. Students now expect to access their coursework from anywhere, making remote connectivity essential in education, enhancing the learning experience, and maximizing the equipment's utility. The ability to control the oscilloscope remotely allows for efficient data acquisition and analysis, streamlining project workflows and maximizing the instrument's utilization. This feature allows students or engineers educators to use the oscilloscope's advanced functions without professors or equipment manufacturers being physically present, increasing efficiency and accessibility. This article explores the remote-control capabilities of the Tektronix 2 Series Mixed Signal Oscilloscope (MSO), set up procedures and a video that demonstrates the set up of a Raspberry Pi controlling a 2 Series MSO.

What are the Benefits of Remote Connectivity?

The key features that make remote connectivity useful include:

  • Sharing data with teammates worldwide
  • Capturing and analyzing data remotely
  • Quickly accessing the oscilloscope through the internet
  • Collaborating flexibly with others, no matter where they are

These remote-control capabilities are crucial for a geographically distributed workforce. Users can control the oscilloscope, share its screen, exchange data, troubleshoot, and analyze it on a computer without needing physical access. This significantly improves data gathering and analysis, helping teams work more effectively and make the most of their equipment.

What is a Programmatic Interface?

A programmatic interface is like a bridge, letting you control the oscilloscope through your software. It uses a common set of commands that both the oscilloscope and user software can understand, allowing you to automate tasks like adjusting settings or collecting data, or controlling triggers.

Figure 1: Programmatic interface stack
Figure 1: Programmatic interface stack. Image Source: tek.com

Tektronix oscilloscopes use SCPI type of commands, which work with any programming language, making it very flexible (Figure 1). For example, programmers often use Python (with PyVISA), MATLAB, LabVIEW, or C-family languages to control these devices. Connections can be made simply through USB without needing a network, using SCPI commands along with a graphical interface on top.

VISA (Virtual Instrument Software Architecture) is an I/O API that is a commonly used industry standard. Some additional standard protocol specifications that manage I/O on top of VISA are USB-TMC for USB control and VXI-11 for TCP/IP control. Some users choose to use Raw Sockets instead of VXI-11 based control over Ethernet.

How To Interface a Raspberry Pi with 2 Series MSO

The Raspberry Pi has become popular for a variety of projects beyond education. Its small size, low price, flexible use, and support for Python programming make it perfect for automating test setups in labs or manufacturing. It can control devices, gather data, capture waveform data and help manage information or remote access, especially for repeated or complex tasks, and with pre-written example programs, it provides a quick solution.

The Tektronix 2 Series MSO is an adaptable tool designed to keep up with the increasing demand for remote learning and hybrid work settings in both schools and workplaces. The MSO comes with built-in features that make remote work easier and help distant teams collaborate. It can take on the roles of several different instruments, which helps streamline processes, save space, and boost efficiency. For instance, using a Raspberry Pi to automate operations with a Tektronix 2 Series MSO can enhance remote learning and working. The MSO is designed to be versatile, supporting diverse ways to work and collaborate from afar. It can perform the functions of multiple devices, simplifying setups and improving efficiency.

Raspberry Pi 402AH3162/3051886

Raspberry Pi 4 Model B

Buy Now

tektronix oscilloscope

MSO22 2-BW-70 Oscilloscope

Buy Now

tektronix oscilloscope 2

MSO22 2-BW-350 Oscilloscope

Buy Now

Demonstrating How to Use a Raspbery Pi to Control an Oscilloscope

The following video shows the best way to use a Raspberry Pi to control a Tektronix 2 Series MSO, including an introduction and setup tips.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Setting Up the Raspberry Pi and 2 Series MSO for Remote Control

The following section guides you through the setup procedure for using a Raspberry Pi to automate a Tektronix 2 Series MSO and configure the instrument for remote control.

Figure 2: Setup for the Tektronix 2 Series MSO Mixed Signal Oscilloscope and a Raspberry Pi
Figure 2: Programmatic interface stack. Image Source: tek.com

As discussed earlier, VISA (Virtual Instrument Software Architecture) is an industry-standard API used for configuring, programming, and troubleshooting instrumentation systems comprising GPIB, VXI, PXI, Serial, Ethernet, and/or USB interfaces. The communication support between the oscilloscope and the Raspberry Pi is based on pyVISA, it is a Python package that enables you to control all kinds of measurement devices independently of the interface. It manages connection and communication with devices.

PyVISA is a Python wrapper for VISA shared libraries but can also serve as a front-end for other VISA implementation such as PyVISA-Py. PyUSB provides for easy access to the host machine's Universal Serial Bus (USB) system for Python 3.

Note: these setup producedures were based on Tektronix documentation provided in the References section at the end of this article.

To install these packages on the Raspberry Pi, execute the following commands in the terminal window:

$ sudo apt update && sudo apt upgrade -y
$ sudo python3 -m pip install pyvisa
$ sudo python3 -m pip install pyvisa-py
$ sudo python3 -m pip install PyUSB

Modify the rule to allow all users to access the USB devices.

$ sudo su
$ echo 'SUBSYSTEM=="usb", MODE="0666", GROUP="usbusers"' >> /etc/udev/rules.d/99-com.rules • exit

After installing the dependencies, restart the Raspberry Pi to apply the changes. Next, we will set up the connection with a Tektronix 2 Series MSO. Connect the USB device port on the right side of the oscilloscope to the Raspberry Pi.

To check if the oscilloscope is detected, use the ‘lsusb’ command. Verify that PyVISA is correctly installed by starting Python and creating a ResourceManager:

>>> import pyvisa
>>> rm = pyvisa.ResourceManager()
>>> print(rm.list_resources())

The output will display the oscilloscope's VISA descriptor, such as:

('ASRL/dev/ttyAMA0::INSTR', 'USB0::1689::261::PQ100125::0::INSTR')

Once you see the correct VISA descriptor, connect to the oscilloscope with:

>>> inst = rm.open_resource('USB0::1689::261::PQ100125::0::INSTR')

This will connect the Raspberry Pi to the oscilloscope.

>>> print(inst.query("*IDN?"))

To confirm the communication, enter an *IDN? query. If the return string lists the correct model number and serial number, then the Raspberry Pi is able to communicate with the oscilloscope.

Once the connection between the Raspberry Pi and oscilloscope is established, you can refer to example projects from Tektronix repository github.

Shop our wide variety of Oscilloscopes from Tektronix  Shop now

About the Sponsor

sponsor

FROM INSPIRATION TO REALIZATION: Tektronix designs and manufactures test and measurement solutions to break through the walls of complexity and accelerate global innovation. Together we empower engineers to create and realize technological advances with ever greater ease, speed, and accuracy. For more information go here

  • Sign in to reply
  • phoenixcomm
    phoenixcomm 10 months ago in reply to Jan Cumps

     Jan Cumps please don't tell me that this beast is yours, I owned one!! Problem film.  

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 10 months ago in reply to phoenixcomm

     > my Scope, is a Textronix's 475A but I have no interface on it

     phoenixcomm , you need a Tektronix C-12 interface:

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • phoenixcomm
    phoenixcomm 10 months ago in reply to beacon_dave

     beacon_dave  Can I get an Ameh?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • phoenixcomm
    phoenixcomm 10 months ago

    Oh, well, my Scope, is a Textronix's 475A but I have no interface on it. not even HP-IB (GPIB or IEE-488 ) and normally it would be a waist as Im moving the probe(s) all the time. ~~ Cris H

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • SensoredHacker0
    SensoredHacker0 10 months ago

    What I havent figured out how to do yet is save as a wave file.
    (did manage to save 1 second, but not more. )
    anyway, in saving as a wave file, theres a huge number of tools to do analysis.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube