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.

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. 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.4. 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.4.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.4.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.4.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.4.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.

 

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.

 

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.
Under the dropdown persistence can be enabled and fixed width and high specified.

 

5.3. XYZ

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.4. 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.5. 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.6. 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.7. 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.8. 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.

Top: setting adjusts how plotted data points are colored. If a data point occurs infrequently enough to fall within the color range band (below the top setting), then it is colored according to how often it has been recorded as occurring. If the data point falls outside the band, meaning it occurs frequently and consistently, then it is colored with whatever the identifying color of its scope input channel is (orange for ch1, blue for ch2, etc).
Middle: setting adjusts the distribution of the range of colors used in the plot, so that a user might more easily distinguish the parts of the signal they are interested in. For example, raising the Middle setting narrows the range of occurrences that are colored red, so that a user might better be able to narrow in on and differentiate between frequently-occurring points in the signal.

 

5.9. 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 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) 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.10. 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.11. 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. 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
// loop to access each sample
Channel.data.forEach(function(sample){
// make sum of samples
    value+=sample
})
// divide the sum with the number of samples to get the average
value /= Channel.data.length
// last line of code is the measurement value

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

Channel.measure("Maximum") - Channel.measure("Minimum")


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.data
var d2 = Scope.Channel2.data
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")/Scope.Channel2.measure("Amplitude"))


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.12. 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.13. 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.14. 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.15. Y Cursors

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

 

6. Export

See Export in Common Interfaces.