Read a Waveform Using a Tektronix Scope
Reading a waveform with a Tektronix® scope using Quick-Control Oscilloscope is basically the same workflow as described in the Read Waveforms Using Quick-Control Oscilloscope example 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. driverlist = drivers(myScope)
This returns the driver and instrument model information.
Driver: tektronix 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.
Create an instance of the oscilloscope.
% Instantiate an instance of the scope. myScope = oscilloscope()
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.Connect to the scope.
% Connect to the scope. connect(myScope);
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');
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 this function, seegetWaveform
.% Acquire the waveform. waveformArray = readWaveform(myScope); % Plot the waveform and assign labels for the plot. plot(waveformArray); xlabel('Samples'); ylabel('Voltage');
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.