Documentation

Read Waveforms Using a Tektronix Scope

Reading a waveform with a Tektronix® scope using Quick-Control Oscilloscope is basically the same workflow as described in Read Waveforms Using Quick-Control Oscilloscope using a Keysight™ scope with VISA. But the resource and driver information is different.

If you use the resources function, instead of getting a VISA resource string as shown in step 4 of the previous example, you will get the interface resource of the Tektronix scope. For example:

% Find resources. 
availableResources = resources(myScope)

This returns the interface resource information.

availableResources =
  GPIBO::AGILENT::7::10

Where gpib is the interface being used, keysight is the interface type for the adaptor that the Tektronix scope is connected to, and the numbers are interface constructor parameters.

If you use the drivers function, you get information about the driver and its supported instrument models. For example:

% Get driver information. 
drivers = drivers(myScope)

This returns the driver and instrument model information.

Driver: tekronix
Supported Models:
  TDS200, TDS1000, TDS2000, TDS1000B, TDS2000B, TPS2000
  TDS3000, TDS3000B, MSO4000, DPO4000, DPO7000, DPO7000B

This example shows the general workflow to use for the Quick-Control Oscilloscope for a Tektronix scope. This feature works with any supported oscilloscope model. You can follow the basic steps using your particular scope.

  1. Create an instance of the oscilloscope.

    % Instantiate an instance of the scope.
    myScope = oscilloscope()
  2. Discover available resources. A resource string is an identifier to the instrument. You must set it before connecting to the instrument.

    % Find resources. 
    availableResources = resources(myScope)

    This returns a resource string or an array of resource strings.

    availableResources =
      GPIBO::AGILENT::7::10

    Where gpib is the interface being used, keysight is the interface type for the adaptor that the Tektronix scope is connected to, and the numbers are interface constructor parameters.

  3. Connect to the scope.

    % Connect to the scope.
    connect(myScope);
  4. Configure the oscilloscope.

    You can configure any of the scope’s properties that are able to be set. In this example enable channel 1 and set acquisition time as shown. You can see examples of other acquisition parameters in step 6 of the previous example.

    % Set the acquisition time to 0.01 second.
    myScope.AcquisitionTime = 0.01;
    
    % Set the acquisition to collect 2000 data points.
    set(myScope, 'WaveformLength', 2000);
    
    % Enable channel 1. 
    enableChannel(myScope, 'CH1');
    
  5. Communicate with the instrument. For example, read a waveform.

    In this example, the readWaveform function returns the waveform that was acquired using the front panel of the scope. The function can also initiate an acquisition on the enabled channel and then return the waveform after the acquisition. For examples on all the use cases for the oscilloscope function, see Quick-Control Oscilloscope Functions.


    % Acquire the waveform. 
    waveformArray = readWaveform(myScope);
    
    % Plot the waveform and assign labels for the plot. 
    plot(waveformArray);
    xlabel('Samples');
    ylabel('Voltage');
  6. After configuring the instrument and retrieving its data, close the session and remove it from the workspace.

    disconnect(myScope);
    clear myScope;

For a list of supported functions for use with Quick-Control Oscilloscope, see Quick-Control Oscilloscope Functions.