Contact us

Live Chat with Tek representatives. Available 6:00 AM - 4:30 PM

Call

Call us at

Available 6:00 AM – 5:00 PM (PST) Business Days

Download

Download Manuals, Datasheets, Software and more:

DOWNLOAD TYPE
MODEL or KEYWORD

Feedback

Sách hướng dẫn

Getting Started with HSI How-to Guide

Enhance Productivity with HSI

Faster waveform transfer from oscilloscope to PC is crucial for applications ranging from monitoring particle collisions in particle accelerators to neurological monitoring during surgeries. The need for near real-time data transfers has never been more pressing. In this how-to guide, we will explore how HSI is revolutionizing the data transfer game for these important applications. We will delve into the technical details of HSI and explore its key features that can transform the way you work. We’ll also show you how to enable HSI on your oscilloscope and how to use HSI with TekScope PC using Python libraries.

What is HSI?

HSI is a new capability that improves waveform transfer from your oscilloscope to your PC. It is a server-client solution where the instrument runs as a server, and clients can be other software like TekScope PC or user-written automation code in Python, C++, C#, etc. All you need is a supported oscilloscope with firmware v2.10 or higher connected to your computer over LAN.

With HSI, you can transfer waveforms at significantly faster speeds than with SCPI. This is because the performance of Curve and Curvestream is dependent on the specific implementation of the SCPI standard by the instrument, whereas HSI has been optimized for high performance and scalability. HSI uses a binary protocol that is optimized for high-speed data transfer. HSI also supports streaming, so you can receive waveforms in real-time as they are captured by the oscilloscope.

HSI is based on Google’s Remote Procedure Call (gRPC) protocol, a modern, high-performance framework. HSI leverages gRPCs’ asynchronous capabilities, allowing you to use your oscilloscope even while it is transferring data to a PC. For example, if you change horizontal or vertical settings or add measurements on the oscilloscope, data transfer will continue, and these updates will be reflected in the next transfer. You do not have to worry about updating your code to account for these scaling changes.

Key Features of HSI

HSI has many key features that make it easy to integrate into your work.

  • HSI is supported on the most widely used Tektronix instruments. HSI is a core feature of instrument firmware starting with version 2.10, enabling seamless interaction with our most widely used instruments, including the 4 Series B MSO Oscilloscope and the 5 and 6 Series MSO Oscilloscopes (B, LP, Windows and Linux included) where high data transfer rates are important.
  • Use Python for easy automation. Python is one of the most popular languages used for test automation. The Python library ‘TekHSI’ can easily be integrated into your workflow. TekHSI is included in our open-source Python package and is equipped with auto-complete, built-in help and real-time syntax checking.
  • Use TekScope PC with HSI for remote analysis. TekScope PC can be used for offline and remote analysis. It features the same intuitive user interface found on Tektronix oscilloscopes, making it easy to integrate into your workflow.
  • HSI reduces complexity and time around acquiring and formatting instrument data. This is a huge improvement compared to slow and complex SCPI based Curve and Curvestream commands.
  • Enjoy the flexibility of cross-platform support. TekHSI (Python library) can be used on multiple operating systems via Python drivers.
  • HSI is free. Access all these benefits without any cost. HSI is included free as part of instrument firmware v2.10, TekScope PC v2.10 and Python client libraries

How to use HSI

HSI is available through:

  1. Instrument Support: Since oscilloscopes capture and create a large amount of data, we picked oscilloscopes as the first place to start implementing HSI. New oscilloscope firmware for Tektronix MSO 4B, MSO 5 (B and LP) and MSO 6 (B and LP) are HSI capable. We are continuously experimenting with other T&M instruments where HSI can make a difference. Learn more.
  2. TekScope PC: This GUI-based offline and remote analysis software features the same user interface as our modern oscilloscopes, as well as various measurement options through a flexible license offering. You can start experiencing HSI right now by starting a free 30-day trial or starting the Basic license. Download now.
  3. TekHSI Python Library: If you like to automate your Tektronix T&M instrument interactions, use our ‘TekHSI’ Python library to leverage this fast interface for data transfer. It is recommended you install this directly via pip. Download now.

Enable HSI on your Oscilloscope

To start using HSI, you first need to enable HSI on your oscilloscope.

To enable HSI on your supported oscilloscope, navigate to Utility > I/O > and then scroll down to ‘High Speed Interface’. Enable the feature and define a custom port if needed as shown in Figure 1. If this option is not available, you may need to update to a newer version of firmware.

Figure 1: Enable HSI on a supported oscilloscope.

Use HSI with TekScope PC

As a TekScope PC user, you do not have to enable HSI on your oscilloscope. When you add new oscilloscopes, at the time of connection, TekScope PC will perform a discovery process to identify if this oscilloscope supports HSI. If it does, TekScope PC uses HSI for all acquisitions and falls back to the SCPI CURVE? command when HSI is not available.

Use HSI with Python Library

HSI is our core technology allowing faster data transfers, and the two python libraries — tekhsi and tm_data_types — will help you use this high-speed technology in your automation environments and projects. tm_data_types is a Python library to help translate between the scope’s binary waveform objects into the more popular waveform formats like .wfm, .csv., etc. tm_data_types Python library also provides pythonic data types for standard T&M waveform types like analog, IQ and digital signals. These Python libraries will be available as simple pip install commands. Installing TekHSI will automatically install tm_data_types, so no need to install tm_data_types separately.

  
 pip install tekhsi

Figure 2. TekHSI Python library installation.

Using TekHSI makes your automation projects much simpler and easier to read. TekHSI code also performs much faster than the SCPI code. Figures 3 and 4 show SCPI code and TekHSI code. Figure 3 is an example of how data is traditionally obtained from an oscilloscope to PC using SCPI.

  
import visa
rm = visa.ResourceManager()
scope = rm.open_resource('TCPIP::192.168.1.1::INSTR') 
scope.write('DAT:SOU CH1')
scope.write('DAT:ENC RPB')
 scope.write('DAT:WID 1')
data = scope.query_binary_values('CURV?', datatype='B')

Figure 3: Example code using traditional SCPI commands for data transfer.

Figure 4 is an example of how to get data using TekHSI. Notice that you do not need to format your waveform data like scaling and encoding, etc. unlike curve. With TekHSI, you just ask for the data, and it comes with the formatting information needed to decipher this data correctly. Not only is this much easier and simpler to read, but it also executes much faster than the SCPI code.

  
from tm_data_types import AnalogWaveform, write_file
from tekhsi import TekHSIConnect

addr = "192.168.0.1" # Replace with the IP address of your instrument 

# Connect to instrument, select channel 1
with TekHSIConnect(f"{addr}:5000", ["ch1"]) as connect:
# Save data from 10 acquisitions as a set of CSV files
         for i in range(10):
               with connect.access_data():
                        wfm: AnalogWaveform = connect.get_data("ch1")
               # Save the waveform to a file
               write_file(f"{wfm.source_name}_{i}.csv", wfm)

Figure 4: Example code using new TekHSI Python library for data transfer.

As you can see in the examples above, the TekHSI example is lengthier, but far more robust. We have an AnalogWaveform class that avoids the binary format manipulation. tm_data_ types contains other Waveform types as well.

TekHSI also uses ContextManagers to handle conditions like acquisitions being ready for transfer so you can avoid the CURVE And WAI paradigm that has become the norm. TekHSI will simply get_data() when the data is ready. In this example we also get the next ten acquisitions, not just a single query like the SCPI example.

It should be noted that when using TekHSI, the command- and-control pieces of the automation still flow through VISA/SCPI, and TekHSI is responsible only for the waveform data transfer.

Data collection from high precision instrumentation is complicated. The actual transfer can be made simpler using modern programming methods like TekHSI. For more detailed information see the Examples on GitHub, and our documentation on ReadTheDocs.

Conclusion

TekHSI comes standard as part of the latest oscilloscope firmware for Tektronix 4 Series B MSOs and 5 and 6 Series MSOs (B and low-profile models). TekHSI is free! Start using TekHSI today and forever change your experience moving data from your instruments to your computer. Learn more at tek.com/HSI.