Documentation Center

  • Trial Software
  • Product Updates

getWaveform

Returns waveform displayed on scope

Syntax

w = getWaveform(myScope);
w = getWaveform(myScope, 'acquisition', true);
w = getWaveform(myScope, 'acquisition', false);

Description

w = getWaveform(myScope); returns waveform(s) displayed on the scope screen. Retrieves the waveform(s) from enabled channel(s). By default it downloads the captured waveform from the scope without acquisition.

w = getWaveform(myScope, 'acquisition', true); initiates an acquisition and returns waveform(s) from the oscilloscope.

w = getWaveform(myScope, 'acquisition', false); gets waveform from the enabled channel without acquisition

This function can only be used with the oscilloscope object. You can use the getWaveform function to download the current waveform from the scope or to initiate the waveform and capture it. See the examples below for the three possible use cases.

Examples

Use this example if you have captured the waveform(s) using the oscilloscope's front panel and want to download it to the Instrument Control Toolbox™ for further analysis.

 o = oscilloscope()
 set (o, ‘Resource', ‘instrumentResourceString');
 connect(o);
 w = getWaveform(o);    

Replace 'instrumentResourceString' with the resource string for your instrument.

Use this example to get the waveform from a circuit output (without configuring the trigger ) and download it to the Instrument Control Toolbox to check it.

 o = oscilloscope()
 set (o, ‘Resource', ‘instrumentResourceString');
 connect(o);
 enableChannel(o,‘Channel1');
 w = getWaveform(o);

Replace 'instrumentResourceString' with the resource string for your instrument.

Use this example to capture synchronized input/output signals of a filter circuit when a certain trigger condition is met, stop the acquisition, and download the waveforms to the Instrument Control Toolbox.

 o = oscilloscope()
 set (o, ‘Resource', ‘instrumentResourceString');
 connect(o);
 set (o, ‘TriggerMode','normal');
 set (o, ‘enableChannel', {‘Channel1',‘Channel2'});
 [w1, w2] = getWaveform(o, 'acqusition', true);

Replace 'instrumentResourceString' with the resource string for your instrument.

Was this topic helpful?