Contactez-nous

Chat en direct avec un représentant Tek. Service disponible de 9 h à 17 h, CET jours ouvrables.

Téléphone

Appelez-nous au

Disponible de 9 h à 17 h CET jours ouvrables.

Télécharger

Télécharger des manuels, des fiches techniques, des logiciels, etc. :

TYPE DE TÉLÉCHARGEMENT
MODÈLE OU MOT CLÉ

Feedback

Blog

HSI is Faster and Simpler Than SCPI


TekHSI

Have you ever wished that pulling waveform data from your oscilloscope could be faster? In this blog, we’ll explore TekHSI (Tektronix High Speed Interface), the speed improvements it offers, and review examples on why it’s so easy to use.

What is TekHSI?

TekHSI is a new feature available on Tektronix 4B, 5 and 6 (B and LP) Series MSO Oscilloscopes via the latest firmware update, v2.10. TekHSI is optimized for high-speed data transfer and is proven to provide a nearly 10x speed increase in comparison to regular SCPI curve or curvestream acquisition methods. This is because while SCPI curve and curvestream are limited by the instrument’s ability to process SCPI commands, TekHSI uses a binary protocol that bypasses this limitation.

To enable TekHSI on your oscilloscope, select Utility -> I/O -> HSI and turn HSI on:

The High Speed Interface settings menu featuring a toggle button to enable High Speed Interface, the port number field, and the timeout parameter in seconds.

Figure 1: TekHSI settings menu.

For more information about how TekHSI works, read the technical brief, Enhance Productivity with TekHSI.

Use TekScope v2.10 with TekHSI

The latest TekScope PC release, available at tekcloud.com, adds support for this new high speed interface (HSI) functionality. TekScope PC is the fastest and most straightforward method to get started with high-speed data transfer. When HSI is enabled on the connected oscilloscope, high-speed data transfer to TekScope PC is possible. What is especially nice is that the speed enhancements afforded by TekHSI are immediately and automatically visible in TekScope without requiring other action or setup, making TekScope PC a quick and easy “no-code” option for users who do not wish to do any programming to leverage all the benefits of the high-speed interface for data acquisition. Additionally, with TekHSI enabled, TekScope PC will leverage high-speed data transfer for all applicable acquisition methods including single, continuous, and ‘Act on Event’ triggers.

Performance Gains with TekScope PC and TekHSI

Figure 2 illustrates the immense performance gains in TekScope PC observed when TekHSI  is used versus curve acquisition with either an i7 or i9 processor. Take note of the single-channel use case, where over 10x performance gains are seen when using TekHSI in combination with a PC sporting an i9 processor. In every use case, TekHSI clearly shows increased performance over typical curve acquisition.

Graph charting the performance of HSI and Curve with both i7 or i9 processors. The data compares the acquisitions per minute at variable sample rates for 1 channel, 2 channels, 4 channels, or 8 channels. Using an i9 processor with HSI has the highest performance with the most acquisitions.

Figure 2: TekScope HSI performance gains over traditional methods with an i7 or an i9 processor.

 

Use Python with TekHSI

The benefits of TekHSI can also be leveraged in Python. All that is needed is to install the tekhsi Python library, which will be available in September 2024.

To install the package, it’s as simple as opening the command terminal and using pip:

pip install tekhsi

To use TekHSI in your Python environment, simply import tekhsi into your Python project to gain access to the API. You’ll notice, in Figure 3, that the commands are far more readable than standard SCPI commands and less commands are needed to perform similar tasks.

TekHSI Example

import tekhsi
scope = tekhsipy.TekScope('0.0.0.0')
data = scope.read_waveform('CH1')	

SCPI Example

import visa
rm = visa.ResourceManager()
scope = rm.open_resource('TCPIP::0.0.0.0::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 : Side by side code comparison using the TekHSI Python library vs. traditional SCPI commands to collect channel 1 waveform data.

Not only is TekHSI faster and more efficient than SCPI, it’s also much easier to use. As you can see in Figure 3, with the tskhsi library, there is no need to format the data before it can be retrieved. Simply use the scope.read_waveform('CH1') command to retrieve your channel one data. We are still fine-tuning our Python packages, so the released library might differ compared to the example above. We anticipate to publicly release these Python packages by early September.

Performance Gains with Python and TekHSI

Huge performance gains are seen when using TekHSI in your Python application. Figure 4 shows that using TekHSI in your Python application results in even faster data transfer compared to using TekScope PC with HSI.

Graph charting the performance of TekScope HSI, Python HSI and Curve at a record length of 5 million. The data compares the acquisitions per minute at variable sample rates for 1 channel, 2 channels, 4 channels, or 8 channels. Python HSI has the highest performance with the most acquisitions, followed by TekScope PC HSI in second, and then finally curve with the fewest acquisitions per minute.

Figure 4: Programmatic Python TekHSI and TekScope HSI performance gains over the traditional curve method at varying sample rates and a 5 million record length

The advantage of using the TekHSI Python library is undeniable. TekHSI greatly outperforms traditional SCPI data acquisition at every sample rate and channel count, providing a 10x speed increase.

Curvestream vs TekHSI

Now, let’s examine how TekHSI compares with curvestream. Prior to the release of TekHSI, the curvestream method was the fastest form of data acquisition from an oscilloscope. However, looking at Figure 5, curvestream is complex – requiring the data to be formatted and encoded before curvestream is enabled. The data also needs to be properly captured and appended, which is a manual process.

TekHSI Example

import tekhsi
scope = tekhsipy.TekScope('0.0.0.0')
data = scope.read_waveform('CH1')

Curvestream Example

import pyvisa as visa
import time
rm = visa.ResourceManager()
scope_address = "TCPIP0::0.0.0.0::inst0::INSTR"
scope = rm.open_resource(scope_address)
scope.timeout = 20000
scope.write("display:waveform 0")
scope.write("horizontal:mode manual")
scope.write("horizontal:mode:samplerate 6.25e9")
scope.write("trigger:a:level:ch1 1")
scope.write("ch1:scale 1")
scope.write("data:encdg rib")
scope.write("data:width 1")
scope.write("data:source CH1")
#turn on all the channels
for k in range(2,9):
	scope.write("disp:glob:ch{}:state 1".format(k))
	scope.write("data:source CH1,CH2,CH3,CH4,CH5,CH6,CH7,CH8")
record = [10000]
data = []
for r in record:
    scope.write("hor:reco {}".format(r))
    scope.write("data:stop {}".format(r))
    #let settings settle
    time.sleep(1)
    #enter curvestream state
    scope.write("curvestream?")
    #check the time
    time_start = time.time()
    #operate for 10 seconds
    while(time.time()-time_start < 10):
        wave = scope.read_raw()
        data.append(wave)
    #stop curvestreaming
    scope.write("*CLS")
scope.close()
rm.close()

Figure 5:  Side-by-side code comparison using the TekHSI Python library vs. Curvestream with SCPI commands to collect channel 1 waveform data quickly.

Not only does TekHSI allow for faster data transfer from the oscilloscope to the PC when compared to curvestream, it is also much simpler to implement.

Try TekHSI Today

Download the new TekScope PC version 2.10 or the new TekHSI (Tektronix High Speed Interface) Python package to leverage all the benefits of high-speed data transfer afforded by TekHSI.  Visit tek.com/HSI to learn more.