Oscilloscope

An oscilloscope (or “scope”) allows you to view a signal's waveform, typically in a two-dimensional graph where one or more electrical signals (on the vertical axis) are plotted as a function of time or of some other voltage (on the horizontal axis).

Most of the time, oscilloscopes are used to show events that repeat with either no change or events that change slowly.


1. Menu

See Menu in Common Interfaces.

1.1. View



2. Control


The Control toolbar allows you to stabilize repeating waveforms and capture single-shot waveforms. By default, this only shows the most important options. The down/up arrow in the top right corner shows/hides the other features.

The Record to File can be opened under Control menu or Rec. toolbar button. This lets you capture samples directly to file in Binary, NI TDMS, WAV or text file.
If digital is enabled, its raw samples are saved as additional channel data.
The reported rates represent the average for the capture. Read refers to data transfer from the device, which is lower with slower captures due to latency importance with smaller transfer chunks. Process refers to data conversion and interleaving if necessary. Write refers to the file writing, which can be slow when writing text formats.


3. Channels

This toolbar contains the time and channel configuration groups. The toggle button in the top-left corner enables/disables the auto hiding of this toolbar.

The Add Channel button opens a drop-down with the following options:

The check-box before the group name enables or disables the respective channel. The drop-down properties button in the top-right corner allows you to configure the channel properties. The math and reference channels also have a close button.

 

3.1. Time Group

Use the time group to position and scale the waveform horizontally using the time base and the horizontal trigger position controls.

In the property drop-down, the following can be configured:

In the Options drop-down, the following can be configured:

Digital:

Sampling:
The sampling lets you synchronize the acquired samples with an external trigger source. The specified sample Rate will be used as reference for the measurement.

 

3.2. Real Channels

Use the real channel (vertical controls) to position and scale the waveforms vertically using the offset and range controls for each channel.

In the property drop-down, the following can be configured:


Input Coupling

Coupling is the method used to connect an electrical signal from one circuit to another. In this case, the input coupling is the connection from your test circuit to the oscilloscope.

On the Electronics Explorer board, the input coupling AC and DC are separate input connectors on the board with AC and DC marks. On the Analog Discovery BNC Adapter jumper, select between AC and DC coupling. DC coupling shows all of an input signal. AC coupling blocks the DC component of a signal so that you see the waveform centered at zero volts.

The following diagram illustrates this difference. The AC coupling setting is handy when the entire signal (alternating plus continuous components) is too large for the volts/div setting.

DC coupling AC coupling
2V peak-to-peak sine wave with 2V DC component

 

3.3. Filter Channels

The Filter channels can be configured in the oscilloscope interface, after collapsing these in the channels column.
The ADP3X50, EclypseZ7, Analog Discovery 3, ADP2230 and newer devices support in-device filter channels. See the device description for more detail.
The sampling on various channels can be enabled by checking the respective channel.

For each real channel there is a Filter channels. The input of these can be selected to be the raw ADC data. In this case the filter is running at the specified system frequency. For the Decimate and Average options the filter rate will be the Scope rate, a downscaled system frequency common for all the Scope channels.

In the filter property drop-down, the following can be configured:

The Filter editor lets you adjust the parameters and preview the transfer characteristics of the filter.

 

3.4. Wavegen Channels

The Wavegen channels can be controlled from the oscilloscope interface, after collapsing these in the channels column.

The channel sampling can be enable only on the devices which support it.
The ADP3X50, EclypseZ7, Analog Discovery 3, ADP2230 and newer devices support digital loopback of the Wavegen channels. See the device description for more detail.
The captured output samples are the digital samples which are sent to the DAC. This is not an analog loopback to monitor the actual output! For such purpose use an Oscilloscope input channel.
With ADP3X50 and EclypseZ7 the two Wavegen channel outputs, Amplitude and Frequency can be captured.
With Analog Discovery 3 the two Wavegen channel outputs and the output or readback of the two Power Supply channels can be captured. This can be selected under the channel's option Sample Mode.
With ADP2230 the Wavegen outputs and the output or readback of the two Power Supply channels can be captured. This can be selected under the channel's option Sample Mode.

For every device the Wavegen channels can be controlled from property dropdown similar to Wavegen Simple configuration mode. The channels are started in synchronized mode.
When a Wavegen channel is controlled from Scope it takes control over this device resource and the respective channel will show busy in the Wavegen instrument.

 

3.5 Reference Channels

The reference channels can be added using the “Add Channel” button from the Channel toolbar.

In the property drop-down, the following can be configured:

 

3.6. Math Channels

The integrated mathematical functions allow you to perform a variety of mathematical calculations on the input signals of the oscilloscope. Simple, Custom, Filter and LockIn math channels can be added with the “Add Channel” button from the Channels.

3.6.1 Simple Math Channel

The simple math channel can be configured to perform the following operations. The mathematical operations are performed by the PC, so the oscilloscope device cannot trigger on these channels.

In the property drop-down, the following can be configured:


3.6.2 Custom Math Channel

The custom or simple math channel can be selected under the channel properties, as shown below.

The Custom Math Function editor can be launched with the bottommost button showing the formula.

You can type the custom function in the text box. It accepts single line or complex multiline functions where return statements should be used. The entered function can be verified with the Evaluate button and the resulting number for one sample is displayed, otherwise the error description is listed.

Click Apply to apply changes. Click OK to save the last valid function. Click Cancel to use the function saved before the editor was opened.

See Script in Common interfaces. The local variables are real, while the reference and math channels will have a smaller index, such as: C1, C2, R1, M1. In the M1 function, no other math channel can be used. In M2, the M1 can be used, while in M3, the M1 and M2 can be used.

Example functions:

 

3.6.3 Filter Math Channel

The Math Filter channels can be added using the “Add Channel” button from the Channel toolbar.

The filter channels have the following options:

In Custom mode, the filter window coefficients can be specified with up to 100 values. The output is normalized according the calculated window volume.

 

3.6.4 LockIn Math Channel

The LockIn amplifier can be used to extract signal based on a know frequency or reference carrier waveform, demodulate or extract from noise. LockIn channels can be added using the “Add Channel” button from the Channel toolbar.

Based on the selected reference source or specified frequency and phase a sine signal is synthesized. This is mixed with input in-phase and quadrature, then the selected filter applied.
For additional outputs of the process LockIn Ouput channels can be added.
The LockIn channels have the following options:

 

4. Main Plot

  1. The center of the display is marked with grid lines. Each vertical and horizontal line constitutes a major division. These are laid out in a 10-by-10 division pattern. The tick marks on the sides between major divisions are called minor divisions. The labeling on the oscilloscope controls (volts/div and sec/div) always refer to major divisions.
  2. On the left side of the view, the horizontal voltage grid line marks are shown for the active channel. Left-mouse button dragging changes the offset, wheel adjusts the range, and right button dragging adjusts the offset and the range of the active channel.
  3. The time marks of the vertical grid lines are located at the bottom. Left-mouse dragging changes the time (trigger horizontal) position and right-dragging adjusts the time base.
  4. On the right side of the view, left-mouse dragging changes the vertical trigger level and right-dragging adjusts the hysteresis level.
  5. On the top side, information about the viewed acquisition is displayed: number of samples, rate, and capture time.
  6. The channel list colors make channel identification easy. Left-mouse clicking the rectangle activates the channel. A right-mouse click disables/hides it.
  7. The status label shows the state of the oscilloscope. See Acquisition States for more information.
  8. The horizontal trigger position arrow can be dragged with the mouse and double-clicking resets the position to zero.
  9. The zero point arrows for each channel can be dragged with the mouse to change the vertical position (offset).
  10. The vertical trigger position arrow can be dragged with the mouse to change the trigger level. The two smaller arrows represent the low and high levels (hysteresis).
  11. See Plots in Common Interfaces.
  12. Noise band, which indicates a glitch or components that have a frequency higher than the sampling frequency. See Acquire Noise and Real channelsoptions.

The Ctrl+1,2,3... shortcuts activate a channel, then the arrow keys can be used to adjust the range and offset. The Shift key slows down and Ctrl key speeds up the adjustment.

 

4.1. Thumbnail

The Thumbnail shows the entire acquisition data highlighting the currently analyzed part.
When stopping the instruments, the mouse-click positions and mouse-scroll resizes the visualized waveform. By clicking on the button in the top left edge, or mouse double-clicking, it will reset the time settings to show the entire acquisition.

 

4.2. Quick Measure

See Quick Measure in Common Interfaces.

 

4.3. Cursors

The X and Y cursors are available for main time view. See Cursors.

The X cursor's drop-down menu contains adjustment controls for the position, reference cursor, delta x value, and remove button.

The Y cursor's drop-down menu contains adjustment controls for the channel, position, reference cursor, delta value, and remove button.

 

4.4. Digital Channels

The Logic Analyzer can be enabled inside the Oscilloscope interface by adding digital channels, or by enabling from the view menu.

The picture below shows the digital input and analog output of a resistor network.

Having the Scope to Digital option enabled the analog channels are digitized with the specified threshold and hysteresis.

 

5. Views

5.1. Zoom

The Zoom views are useful in analyzing a portion of the main view and comparing these segments.
The selected area is marked in the main time plot by a rectangle while the mouse cursor is above the zoom window.

 

5.2. XY

The XY view allows you to plot one channel against another. This plot could be the I-V curve of a component such as a capacitor, inductor, a diode, or a Lissajous figure showing the phase difference between two periodic waveforms. XY view is also capable of more advanced operations, such as plotting a math channel against a reference waveform.

The channels for X and Y representation can be selected on the top side. Multiple XY pairs can be activated or multiple XY views added. The More dropdown contains the following options:

 

5.3. XYZ

The XYZ view allows you to plot XY with Z as color or strength.

The channels for X, Y and up to four Z axis can be selected on the top side. The More dropdown contains the following options:

 

5.4. XYZ 3D

The XYZ view allows you to plot 3D scatter graph. It is supported under 64 bit Windows and MacOS builds.

The channels for X, Y and Z axis can be selected on the top side and contains the following options:

 

5.5. FFT

The FFT view plots amplitude versus frequency. In other words, it shows signals in the frequency domain, as opposed to the time view, which shows signals in the time domain as amplitude versus time. It is especially useful for tracking down the cause of noise or distortion in measured signals.

This view contains a subset of Spectrum Analyzer instrument features. To have more options, use this instrument.

The FFT toolbar only shows the most important options by default. The down/up arrow in the top-right corner shows/hides the other features. This toolbar contains the following:

 

5.6. Spectrogram

The Spectrogram is a visual representation of the spectrum of frequencies in a sound or other signal as they vary with time. The horizontal axis represents time, the vertical axis is frequency; a third dimension indicating the amplitude of a particular frequency at a particular time is represented by the intensity or color of each point in the image.

The Spectrogram view toolbar only shows the most important options by default. The down/up arrow in the top-right corner shows/hides the other features. This toolbar contains the following:

 

5.7. Spectrogram 3D

In Spectrogram 3D lets you draw 3D surface spectrogram. The X axis represents time, the Y axis is frequency and Z axis the amplitude.

The toolbar contains the following:

 

5.8. Histogram

A histogram is a graphical representation of the voltage distribution in a signal waveform. It plots the distribution of values for each voltage value, with the number of times the signal has a certain voltage value represented as a percentage.

The picture below shows the histogram view of a sine and another signal.

The Auto scale option adjusts the scale for each channel separately based on the maximum value. With manual scale, a common Top level can be specified.

 

5.9. Persistence

Persistence view superimposes multiple waveform acquisitions on the same view. The more frequent waveforms are drawn with hotter colors than rare ones. The view is cleared by the clear button, after making any configuration change, or restarting repeated acquisition.

This view is useful to detect glitches, or to catch a rare event in a series of repeated normal events. The areas of the view that have the highest density are red (hot), while the areas with the lowest density are blue (cold). The persistence is infinite.

 

5.10. Eye Pattern

Eye Pattern view superimposes multiple samples of signal periods from one or multiple captures. The more frequent waveforms are drawn with hotter colors than rare ones.

It is recommended to be used with high number of Samples which is adjustable in the Time group or select Record mode if the device supports it, like ADP3X50, ADP2230 with DDRam recording. When used with repetitive captures the phase information information between the capture is unknown and information about low frequency jitter is lost.

If the device supports frequency adjustment (like ADP3X50, AD3, ADP2230) it is good to set this to an unrelated to the analyzed rate. This to improve the frequency and phase detection method by having varying phase between the signal and sampling. If supported, the device frequency can be adjusted under Settings/ Options/ Device.


By default the left axis shows the vertical and the bottom the crossing point histogram.
When quick measure is activated the histograms at cursor position or selected area is shown.

 

5.11. Data

The Data view displays the acquisition samples and the time stamps.


The column header shows the sample index, the first column shows the time stamp, followed by the values for channels.

The selected cells can be copied and pasted to other applications.

 

5.12. Measurements

The Measurements view shows the list of the selected measurements.

The first column in the list shows the channel, the second shows the type, and the third shows the measurement result. See the mouse operations found in the Lists section.

Pressing the Add Default Measurement button opens the Add Measurement window. On the left side is the channel list, and on the right side is a tree view containing the measurement types in groups. Pressing the Add button here (or double-clicking an item) adds it to the measurement list.

The Show menu options allows you to create statistics out of measurements between acquisitions, which can be cleared with the Reset button.

 

Vertical-axis measurements for each channel: Horizontal-axis measurements for each channel:

The Add/Custom Channel measurement opens a script editor with an average calculation example script. A custom measurement involving one Channel's data can be created here. This will be added to the Defined Measurement Custom category list to be used for other channels.
T1 and T2 are time positions relative to T0. The value of these: for Capture extent represent the first and last sample of the capture, for Visible the currently visible time span, and for Cursor the selected X cursors positions. The Channel.getData(T1,T2) returns the samples for the time span, Channel.measure("name", T1, T2) the measurement performed between T1 and T2.
See the predefined vertical measurements that can be opened with Edit as read-only examples.

See Script in Common interfaces. In the Locals menu, you can find Time and Channel, which are two script specific objects.

Average calculation:

// initialize a local variable
var value = 0
var data = Channel.getData(T1,T2) // loop to access each sample
data.forEach(function(sample){
// make sum of samples
    value+=sample
})
// divide the sum with the number of samples to get the average
value /= data.length
// last line of code is the measurement value

Accessing other measurements, calculating peak-to-peak value:

Channel.measure("Maximum",T1,T2) - Channel.measure("Minimum",T1,T2)


The Add/Custom Global measurement opens a script editor with a phase calculation example script. Custom measurement accessing multiple channels can be created here. The Local is the instrument object called Scope.

Phase calculation:

// initialize local variables
var sum1 = 0
var sum2 = 0
var sum12 = 0
// for better performance get and use local copy of data array
var d1 = Scope.Channel1.getData(T1,T2)
var d2 = Scope.Channel2.getData(T1,T2)
var c = d1.length
for(var i = 0; i < c; i++){
    sum1 += d1[i]*d1[i]
    sum2 += d2[i]*d2[i]
    sum12 += d1[i]*d2[i]
}
sum1 /= c
sum2 /= c
sum12 /= c
// last line of code is the measurement value
acos(sum12/sqrt(sum1*sum2))*180/PI

Accessing other measurements, calculating gain in dB:

log10(Scope.Channel1.measure("Amplitude",T1,T2)/Scope.Channel2.measure("Amplitude",T1,T2))


The Edit opens the script editor for custom measurements. The predefined Vertical and Horizontal measurements for performance reason are hard-coded and some are shown as read-only example scripts in the editor.

 

5.13. Logging

See Logging in Common Interfaces.

The script allows custom saving of data, logging, or processed information. Scope is a local object. Index and Maximum are the values shown above the script.

// local variable
var ch = Scope.Channel1
// condition for saving, average measurement to be less than 5 V
if(ch.measure("Average")<5)
{
    // instantiate file object for acquisition and write channel data
    File("C:/temp/acq"+Index+".csv").write(ch.data)
    // file file for measurements
    var filem = File("C:/temp/measure.csv")
    // in case file does not exists
    if(!filem.exist())
    {
        // write (erasing earlier content) the header line
        filem.writeLine("Time,Average,Peak2Peak")
    }
    // append line with measurement we want to save
    var textm = Date()+","+ch.measure("Average")+","+ch.measure("Peak2Peak")
    filem.appendLine(textm)
    // increment Index
    Index++
}

 

5.14. Counter

The counter view is available with devices which support this feature, like Analog Discovery 3, ADP3X50, ADP2230...
This shows trigger counter/timer measured in the device while the instrument is running.

 

5.15. Audio

The audio view can play the data as sound using the default audio output of the computer.

In order to continuously play back the capture data use Speed 1X and scan Screen or Shift acquisition Modes.

 

5.16. X Cursors

The X Cursors show cursor information in table view. See Cursors.

This table shows additional information to cursor tooltips: the 1 / delta x frequency, delta y vertical difference, and delta y / delta x.

 

5.17. Y Cursors

The Y Cursors show cursor information in table view. See Cursors.

 

6. Export

See Export in Common Interfaces.