Table of Contents

WaveForms Reference Manual

WaveForms is the virtual instrument suite for Digilent Test and Measurement devices.

The most up to date version of the following material is located in the Help tab in the WaveForms application. The Help tab is located to the right of the Welcome (Instrument menu) tab.

Features

Oscilloscope
Waveform Generator
Voltage Supply
Data Logger
Logic Analyzer
Pattern Generator
Static I/O
Network Analyzer
Spectrum Analyzer


1. Getting Started with WaveForms

Install the WaveForms software, if you haven't already. Installer Details for more information.

Connect your board to your PC using the USB connector and the supplied USB cable.

Start the WaveForms application from the Start Menu > All Programs > Digilent > WaveForms > WaveForms.

The application starts and connects to your board.

The status bar of the WaveForms main window displays the device name and serial number, as shown below.

1.1. Troubleshoot WaveForms

Only one application can be connected to one board at a time. If you get the message “The selected device is being used by another application” check the taskbar for other applications in use.

If the application is not working as expected, try starting the WaveForms application from the MS Windows Start Menu > All Programs > Digilent > WaveForms > WaveForms Safe Mode or the WaveForms application with “clear” parameter.

See the device-specific troubleshooting:

1.2. Select an Instrument

The WaveForm's main window Welcome tab (shown above) has buttons for each instrument: Scope (Oscilloscope), Wavegen (Arbitrary Waveform Generator), Supplies (Supplies and Reference Voltages), Meters (Voltmeters), Analyzer (Logic Analyzer), Patterns (Digital Pattern Generator), Static I/O (Static Digital Input/Output), Bode (Network Analyzer), Spectrum Analyzer and Script instruments. The instruments can also be opened from the Welcome tab “+” (add) menu.

An instrument's button is disabled when the selected device or configuration does not support it.

The Settings menu contains the Options, the Device Manager, and Trigger PC.

The Workspace's Open, Save, and Save as buttons allow the user to load or save WaveForms workspaces.

When an instrument is closed, its state is saved and loaded when reopened. The New button creates a new workspace, which can be used to close the instruments that are currently open while also forgetting the last instrument configurations.

1.3. The Workspace and Project

The workspace refers to any open instruments and their current state. The workspace can be loaded and saved with the Open and Save/Save as buttons in the WaveForm's Welcome tab.

The workspace can be saved in one of the following modes selected by the save filter:

The workspace files are associated with WaveForms. When you open a workspace (double-click on a *.dwf3work file) and WaveForms is running, it will be opened with the last used application instance. Otherwise, if WaveForms is not currently running, it will open with a new application instance.

The project refers to an instrument and its current state. The project can be loaded and saved with the Open and Save buttons in each instrument.

The project files are associated with WaveForms. When you open a project (double-click on a *.dwf3scope, *.dwf3wavegen, *dwf3analyzer, … file) and WaveForms is running, it will be opened with the last used application instance. Otherwise, if WaveForms is not currently running, it will open with a new application instance.

2. Options

The Options window allows you to select various display and configuration preferences.

To open the Options window, select the Settings / Options menu from the WaveForms window.

3. Device Manager

The Device Manager allows you to select the device and configuration to use with the WaveForms application.

To open the Device Manager, select the Settings / Device Manager menu or click on the window's status bar device button from the WaveForms window.

Devices list: Select the device you want to use. The Demo device allows you to explore WaveForms's capabilities without a physical device being connected to the PC.

Configurations: Select the configuration you want to use for the selected device. The configurations have different device buffer-memory distributions for the instruments and other capabilities, like number of pins or channels.

Calibrate list: The Calibrate button opens the Calibration window.

4. Device Calibration

The Device Calibration window allows you to calibrate (fine-tune) a device's analog components, like the read-voltage levels of the Oscilloscope or Voltmeters, the output level of the Waveform Generator or Adjustable Power Supplies of the Electronics Explorer board, or the Oscilloscope and Waveform Generator of the Analog Discovery device.

Start the Device Calibration window from the WaveForms main window Settings / Device Manager.

The following window will open. The items in the calibration list depend on the selected device type.

5. Common Interfaces

The menu strips of the instrument windows generally have:

5.2. Lists

The mouse operations for lists are as follows:

Select

Select

Move

5.3. Plots

The center of the plot is marked with grid lines. Each vertical and horizontal line constitutes a major division. For linear scales these are laid out in a 10-by-10 division pattern. The tick marks on the sides between major divisions are called minor divisions. For logarithmic scales major tick ticks are show for each decay value and minor ticks for 2,3,4… points.

The plot sides allow scaling adjustment with left-button mouse drag the offset/position is changed and with right-button or mouse wheel or left-button and Alt key pressed the range is changed. The Ctrl key speeds up and Shift slows down the respective operation.

Each plot has a drop-down button in the top-right corner or mouse right-click shows menu containing options for:

The HotTrack lets you take measurements by moving the mouse cursor. This shows a vertical cursor and the values at intersections with waveforms. This can be enabled and disabled with the toggle button in the top-right corner or mouse double click on the plot. Click on the plot locks or unlocks the hottrack to current position.

The Cursors are used to measure the amplitude, to indicate certain places on the waveform, such as band or channel limits. Using delta cursors, you can make measurements that deal with power change with frequency or time. These can be added by pressing the X button in the plot bottom left corner. The Y cursors in Scope main time plot can be added by Y button in top right corner. The first cursors is by default added as normal cursor, the following ones as delta of this, showing the difference. The cursors position can be modified by mouse drag, keyboard arrow keys or adjustment control in cursor's drop-down menu. Mouse button middle click removes the cursor. The cursors can be selected with the channel number shortcut, pressing 1, 2,..

The Cursor view enabled in the instrument's View menu shows the position and measurements in table. The cursor's drop down menu and the table as well, contains adjustment controls for the reference cursor selection, position, delta value relative to reference cursor and remove button. For horizontal cursors the position is expressed in horizontal axis unit and vertical value is shown in intersection with each waveform.

5.4. Docking Windows

The docking windows functionality gives you flexible organization of docking windows within the parent window.

Docking window functionality

The windows can be dragged by their top border. When dragging is above the margins of the parent window, it will indicate the drop region. If you release the mouse, the child window will be docked to the corresponding margin. If you position a child window above another child window with same parent, it can dock in tabular mode. Releasing a window outside of drop regions makes the window float.

5.5. Export

The Export dialog lets you save the data or screenshot. The data can be saved as CSV (comma separated values) or TXT (tab delimited values). By checking the save options, the following information will also be saved:

The screenshot image can be saved in various image formats.

5.6. Script

The script editor uses java-script language to create custom Math channel in Scope, custom waveform pattern in WaveGen and Meter channel function. These expect mathematical function which will be called for each sample to transform input value (data or X).

The specific objects and variables available in each of these can be found under the Insert menu Locals group. Beside these the standard script elements are the following:

The custom measurements in Scope expects a more complex script, where the value in the last line is the result. Here you probably need to implement loop to process the acquisition data.

For further information see Script Code.

5.7. Logging

The Logging tool allows you to save data on each acquisition or executing custom script code. This is available in Scope, and Analyzer instruments.

Expression Output
d the day as a number without a leading zero (1 to 31).
dd the day as a number with a leading zero (01 to 31).
ddd the abbreviated localized day name (e.g., 'Mon' to 'Sun'). Uses the system locale to localize the name.
dddd the long localized day name (e.g., 'Monday' to 'Sunday'). Uses the system locale to localize the name.
M the month as a number without a leading zero (1-12).
MM the month as a number with a leading zero (01-12).
MMM the abbreviated localized month name (e.g., 'Jan' to 'Dec'). Uses the system locale to localize the name.
MMMM the long localized month name (e.g., 'January' to 'December'). Uses the system locale to localize the name.
yy the year as a two digit number (00-99).
yyyy the year as a four digit number.
h the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display).
hh the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display).
H the hour without a leading zero (0 to 23, even with AM/PM display).
HH the hour with a leading zero (00 to 23, even with AM/PM display).
m the minute without a leading zero (0 to 59).
mm the minute with a leading zero (00 to 59).
s the second without a leading zero (0 to 59).
ss the second with a leading zero (00 to 59).
z the milliseconds without leading zeroes (0 to 999).
zzz the milliseconds with leading zeroes (000 to 999).
AP or A use AM/PM display. A/AP will be replaced by either “AM” or “PM”.
ap or a use am/pm display. a/ap will be replaced by either “am” or “pm”.
t the timezone (for example “CEST”).

6. States

The active instruments (Oscilloscope, Wavegen, Logic, and Patterns) step through states while acquiring or generating a signal.

From each of these instruments, multiple instances can be opened at a time; however, only one instance can be active. When more instruments of the same type are opened, the last used instance (after pressing Run or Stop) controls the device. The others display a Busy status.

6.1. Acquisition States

6.2. Generator States

The following diagram illustrates the states of the Arbitrary Waveform Generator and Digital Pattern Generator.

The Repeat cycle can be configured to include Trigger or not.

If any setting (frequency, duty, signal type, etc.) is modified, from any state, it goes right to the Config state. If the instrument was running, it will be started again.

7. Triggers

The trigger event is the rising edge of the trigger signal. The Electronics Explorer board has four trigger input pins. They are used by the Oscilloscope, Arbitrary Waveform Generators, Logic Analyzer, and Digital Pattern Generator instruments. The instruments output a trigger signal as long as they are in Run state.

Any of these instruments can be triggered by any of the trigger signals coming from external pins or the other instruments.

The Waveform Generator channels can function as independent instruments, having their own controller, or in synchronized mode when the selected channels are controlled by one state controller.

The input instruments (Oscilloscope and Logic) have a trigger detector based on their input channels.

The Trigger PC event is generated by pressing the button under the main window device menu. On the Electronics Explorer board, this trigger event is generated when the board switch is turned to the on position as well.

The None trigger mode configuration in the instruments means that acquisition or generation doesn't wait for a trigger, it starts immediately.

The Auto trigger mode for input instruments means that if the trigger condition doesn't appear in approximately two seconds, acquisition is started automatically.

In multiple acquisition mode, when the instruments switch to Auto trigger, subsequent acquisitions are made without waiting for timeout as long as a trigger event does not occur and the configuration is not changed. When a new trigger event occurs or the configuration is changed, the current acquisition is finished and the next one waits for the trigger. It is also the best mode to use if you are looking at many signals and do not want to set the trigger each time.

8. Installer

The Mac OS® X application is packaged in an Apple Disk Image file, like: digilent.waveforms_3.0.0.dmg. To install the application, copy it from the image to the Applications folder.

For Linux®, the application is available in DEB and RPM packages for 32 and 64-bit systems. The required Digilent Adept Runtime must be installed separately.

The installers for Microsoft Windows®, like digilent.waveforms_v3.0.0.exe, has the following command line arguments:

The following are the command line arguments for the WaveForms application:

For projects, the instrument is opened and project loaded:

In order for these options to work, the path where the application is installed has to be selected in the command line.


Oscilloscope

An oscilloscope (or “scope”) allows you to view signal voltages, typically in a two-dimensional graph where one or more electrical potential differences (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 change slowly.

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 important options. The down/up arrow in the top left corner shows/hides the other features.

Selecting the scan modes (Screen and Shift) will change the time base to be at least 1 second span, 100 ms/division. Adjusting the time base to lower than this value will change to Repeated mode.

The slope-condition control determines whether the trigger point is on the rising or the falling edge of a signal. A rising edge is a positive slope and a falling edge is a negative slope. The level control determines where the trigger point occurs on the edge. The following figure shows you how the trigger slope and level settings determine the waveform display.

Triggering on rising edgeTriggering on falling edge

The picture below shows a positive pulse trigger configured for less than 200 µs.

The picture below shows a positive pulse trigger configured for time-out at 200 µs.

The picture below shows a positive pulse trigger configured for more than 200 µs.

The picture below shows a rising transitions trigger from -3V to +3V configured for less than 200 µs.

The picture below shows a rising transitions trigger from -3V to +3V configured for time-out at 200 µs.

The picture below shows a rising transitions trigger from -3V to +3V configured for more than 200 µs.

The picture below shows how, without hysteresis, the trigger event also occurs on the falling edge of the input signal due to signal noise.

The following figure shows how the trigger holdoff helps to create a usable display.

Trigger with 10ms holdoff Trigger with 10ms holdoff.

Trigger without holdoff' Trigger without holdoff.

The holdoff length should be around the maximum burst length, preferably a little bit more, but not less than this. For the above situation the holdoff value should be around 6ms, but lengths between 6 and 15 ms are also acceptable.

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.

Digital oscilloscopes can provide pre-trigger viewing because they constantly process the input signal, whether a trigger has been received or not. Pre-trigger viewing is a valuable troubleshooting aid. For example, if a problem occurs intermittently you can trigger on the problem, record the events that led up to it, and possibly find the cause.

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

Digital:

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. Math Channels

The integrated mathematical functions allow you to perform a variety of mathematical calculations on the input signals of the oscilloscope. Simple and Custom math channels can be added with the “Add Channel” button from Channels. The simple math channel can be configured to add, subtract, multiply, or divide two channels. The mathematical operations are performed by the PC, so the oscilloscope device cannot trigger on these channels. The units for the math channel can be specified, for instance: A, W.

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

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 bottom-most button showing the formula.

You can type the custom function in the Enter Function text box. If the entered function is valid, 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 in M3, the M1 and M2 can be used.

Example functions:

3.4. 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:

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 dragging changes the offset and right-dragging adjusts 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.
  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 indicating glitch or higher frequency components than the sampling frequency. See Real channels options.

4.1. HotTrack

See HotTrack in Common Interfaces.

When the mouse cursor position is in a signal row, it will place a vertical cursor along with two more towards the right, measuring the pulse-width and period. Otherwise, it will place one vertical cursor showing the time position and the waveform's level at the intersections with the vertical cursor.

4.2. 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.3. 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. FFT

The FFT view plots amplitude against 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 against 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 important options by default. The down/up arrow in the top left corner shows/hides the other features. This toolbar contains the following:

The gear drop-down contains the following options:

5.2. XY

Using 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 and in the properties button in the top-left corner beside the other plot options.

5.3. 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 adjust the scale for each channel separately based on maximum value. With manual scale a common Top level can be specified.

5.4. 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.5. 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 allow 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. Here custom measurement involving one channel data can be created. This will be added to the Defined Measurement Custom category list to be used for other channels. See the predefined horizontal measurements that can be opened with Edit as read-only examples.

See Script in Common interfaces. The Locals are Time and Channel object which is the selected channel for the current measurement.

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
value

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

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

The Add/Custom Global measurement opens a script editor with an phase calculation example script. Here custom measurement accessing multiple channels can be created. 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
Math.acos(sum12/Math.sqrt(sum1*sum2))*180/Math.PI

Accessing other measurements, calculating gain in dB:

Math.log(Scope.Channel1.measure("Amplitude")/Scope.Channel2.measure("Amplitude"))/Math.LN10

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.6. Logging

See Logging in Common Interfaces.

The script allows custom saving of data, logging, or processed information. The Locals are the instrument object called Scope. 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.7. X Cursors

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

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

5.8. Y Cursors

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

6. Export

See Export in Common Interfaces.


Waveform Generator

The Arbitrary Waveform Generator (or Wavegen) generates electronic waveforms. The waveforms can be either repetitive or single-shot. Different triggering sources can be used: internal (from other devices) or external.

The resulting waveforms can be input into a device being tested and analyzed with the Oscilloscope as they progress through the device. This is useful for confirming the proper operation of the device or pinpointing a fault in the device.

The main window has three areas: the control toolbar at the top, the configuration form(s) on the left side, and the signal preview plot(s) on the right side.

See Menu in Common Interfaces.

1.1. Edit

The Edit menu lets you copy or swap the channels configurations.

2. Control

Run All / Stop All button: starts or stops the selected signal generators.

Channels: selects the channel(s) to be controlled. For every channel you select, a configuration form and a signal preview plot are displayed.

* Available on Electronics Explorer board.

Synchronization Mode:

3. Preview

For every channel you select, a signal preview plot is displayed.

The plot options menu on the top-right edge (next to common plot options) contains controls to scale the plot waveforms. Having the Scale option in Full mode allows manual adjustment of time. The vertical scaling in Manual mode can be adjusted as well.

A horizontal left-button mouse drag on the plot changes the start position, and a right-button mouse drag changes the horizontal domain of the preview. A vertical left-button mouse drag on the left/right side changes the modulator/voltage position, and a right-button mouse drag changes the vertical range of the preview.

The actual output might differ from the preview depending on external load, especially at high frequencies.

4. Channel

Run/Stop button: starts/stops the signal generation for the selected channel. The waveform generator channel can be started individually.

Enable button: enables or disables the output.

The channel options allows you to select:

* Available on Electronics Explorer board

5. Configuration Modes

For every channel you select, a configuration mode will be displayed. The custom and play waveforms are shared between the channels and configuration modes.

5.1. Simple

The Simple configuration mode for a simple standard signal configuration.

Type represents the standard signal types: DC, Sine, Square, Triangle, Ramp-Up, Ramp-Down, Noise, Trapezium, and Sine-Power. Under the options menu, a Custom waveform can be created and file imported as pattern or play data.

For the Noise signal, the Frequency represents the DAC update rate, and the Symmetry and Phase parameters are disabled.

The Sine-Power signal is a sine signal where the power attribute is 0. For higher power attributes, the waveform tends to have square shape. The function for the power attribute is the following: if (power > 0) = Sin(x) ( 100 / (100-power) ) if (power < 0) = Sin(x) ( (100+power) / 100 )

Frequency, Amplitude, Offset, Symmetry, and Phase allow you to modify signal parameters.

Trigger, Wait, Run, and Repeat settings let you generate burst signals. See States for more information.

5.2. Basic

The Basic configuration mode for standard signal configuration.

Signal icons represent the standard signal type.

Frequency, Amplitude, Offset, Symmetry, and Phase sliders let you easily modify signal values between the maximum and minimum limits. These limits can be adjusted using the combo boxes at the top and bottom of the sliders.

Trigger, Wait, Run, and Repeat settings let you generate burst signals. See States for more information.

5.3. Custom

New button lets you create and edit a new custom waveform. See Editor for more information.

Import button lets you load a waveform from file. See Import file for more information.

Edit button lets you edit the currently selected signal.

Remove button lets you remove the selected or all signals.

Frequency, Sample Rate, Amplitude, Offset, and Phase let you modify the signal parameters.

Trigger, Wait, Run, and Repeat settings let you generate burst signals. See States for more information.

5.4. Sweep

Select Sweep configuration mode for easy setup of sweep and damp signals.

The Sweep and Damp checkboxes enable or disable these modes.

In sweep mode, the signal frequency changes linearly from the first value to the second in the specified time.

In damp mode, the signal amplitude changes linearly from the first level to the second in the specified time.

Type can be a standard or custom. Using the options menu after the signal type, custom signals can be generated or imported from a file. These are added to the type list.

Frequency, Amplitude, Offset, Symmetry, and Phase let you modify signal parameters.

Trigger, Wait, Run, and Repeat settings let you generate burst signals. See States for more information.

5.5. Advanced

Select the Advanced configuration mode for setting complex configurations.

Trigger, Wait, Run, and Repeat settings let you generate burst signals. See States for more information.

Carrier, FM, and AM signals are configured in separate columns.

Type can be a standard or custom. Using the options menu after the signal type, custom signals can be generated or imported from a file. These are added to the type list.

Configurations consist of:

* With Electronics Explorer board for each channel only one of AM and FM can be custom signal type at a time.

6. States

See Generator States and Idle output for more information.

Using the (Trigger), Wait, Run, and Repeat settings, burst signals can be generated.

The following screenshot shows a burst signal.

7. Editor

The Editor lets you easily create arbitrary signal shapes as well as custom carrier signals and modulators.

To launch the Custom editor from the Custom, Sweep, or Advanced configuration form, select the New signal option or select Edit for an existing custom signal.

This lets you generate signals from mathematical functions.

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

Example functions:

8. Import

To import a data file into the Custom, Sweep, or Advanced configuration form, select Import and then select File.

Browse button opens a dialog box where you can select a different file to load.

In case the import does not detect the file coding properly, adjust the options in Format group to specify the:

The import group contains the following parameters:

Plot area shows the selected data range.


Power Supplies

The power supply interface is different for devices.

Analog Discovery

This instrument allows you to enable the device power supplies. See Power Supplies for more information.

See Menu in Common Interfaces.

Analog Discovery 2

This instrument allows you to enable the device power supplies. See Power Supplies for more information.

See Menu in Common Interfaces.

Electronics Explorer

This instrument has two main areas: the control area and the plot window.

The control area contains power supplies with adjustable voltage and current.

See Menu in Common Interfaces.

The control area lets you adjust the settings for the various voltmeters and power supplies.

See Meter about the other features.


Data Logger

The Data Logger uses the oscilloscope channels. When the Logger is running, it takes control over the two physical oscilloscope channels and the Oscilloscope instrument state is “busy”. Similarly, when the Oscilloscope is started, the Logger is stopped. The oscilloscope sweeps are windowed and DC, AC, and DC RMS values calculated. For the True RMS value, the same acquisition is used as for the DC voltage, and the value is calculated with the formula Sqrt( sum( xi ^ 2 ) / N ). The AC RMS value is calculated with the formula Sqrt( sum( (xi - dc) ^ 2 ) / N ).

1. Plot

The history plot has the following components:

For each channel, the color and scaling option can be specified: auto scaling based on the extremes from the plot history or manually specified offset and range.

See Script in Common interfaces. The local variables are the elementary logger channels, which vary depending on the device.

Example functions:

2. Export

See Export in Common Interfaces.


Logic Analyzer

The Logic Analyzer allows acquisition and visualization of digital inputs.

It is possible to configure the information being visualized: to choose which signals to visualize, to group signals in buses, to configure protocol interpreters, and to visualize them in a specific order.

See Menu in Common Interfaces.

1.1. View

2. Control

The acquisition bar contains the following:

3. Signal Grid

The Signals Grid allows you to customize the display of the signals that you are interested in. See the operations found in the Lists section.

The grid menu contains the following options:

The Bus, SPI, I2C, and UART menus open the corresponding property editor, and after configuring them, it will be added to the grid.

The grid columns are as follows:

The overall trigger condition is built by AND-ing all level conditions together with the result of OR between edge conditions of each pin. The following trigger conditions are possible for each pin:

The grid context menu opens on mouse right-click. This contains similar buttons as the grid toolbar's Add, Remove, and Edit menus.

The waveform area is divided in three sections: top, bottom, and center.

On the bottom area, the time position can be adjusted by horizontal left mouse button drag and the time base by right mouse button drag.

3.1. HotTrack

See HotTrack in Common Interfaces.

When the mouse cursor position is in a signal row, it will place a vertical cursor along with two more towards the right, measuring the pulse-width and period. Otherwise, it will place one vertical cursor showing the time position and the waveform's level at the intersections with the vertical cursor.

3.2. Cursors

The Cursors are available for main time view. See Cursors.

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

4. Property Editor

The property editor can be opened for the selected signal, bus, or interpreter under the grid toolbar edit menu.

4.1. Signal

In the signal property editor, the name can be specified and the device pin changed.

4.2. Bus

In the bus property editor, the following can be configured:

4.3. SPI

SPI interpreter lets you define a synchronous serial data link with the following options:

4.4. I2C

For I2C or Two Wire Interface interpreter, the clock and data signals can be selected.

4.5. UART

The UART interpreter for asynchronous serial protocols lets you select:

5. Views

5.1. Data

The Data view displays the data samples.

The column header shows the sample index, the first column shows the time stamp, followed by the values of the added channel's components.

5.2. Logging

See Logging in Common Interfaces.

The script allows custom saving of data or processed information. The Locals are the instrument object called Logic. Index and Maximum are the values shown above the script.

// condition for saving, DIO0 to exists
if('DIO0' in Logic.Channels){
    // instantiate file object for acquisition
    var file = File("C:/temp/dio0_"+Index+".csv")
    var data = Logic.Channels.DIO0.data
    // write data to file
    file.write(data)
    // increment Index
    Index++
}

5.3. Cursors

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

6. Export

See Export in Common Interfaces.


Digital Pattern Generator

The Digital Pattern Generator (Patterns) lets you define the output on the digital lines, using standard types or user-defined types.

When a line is used by the Static I/O as an output element (Slider, Button, or Switch), this has priority over the signal configuration in Patterns.

See Menu in Common Interfaces.

2. Control

Run/Stop button: starts/stops the signal generation.

Trigger, Wait, Run, and Repeat settings let you generate burst signals. See States for more information.

3. Signals Grid

The Signals Grid allows you to customize the display of the signals that you are interested in.

The grid menu contains the following options:

The Bus menus open the corresponding property editor and after configuring them, it will be added to the grid.

The grid columns are as follows:

The grid context menu opens on mouse right-click. This contains similar buttons as the grid toolbar's Add, Remove, and Edit menus. The difference is that instead of signal, bus, or interpreter addition, insert will be performed above the last selected row.

The waveform area is divided into three sections: top, bottom, and center.

On the bottom area, the time position can be adjusted by a horizontal left mouse button drag while the time base can be adjusted by a right mouse button drag.

4. Property Editor

The property editor can be opened for the selected signal, bus, or interpreter under the grid toolbar edit menu.

4.1. Signal

In the signal property editor, the name can be specified and the device pin changed.

4.2. Bus

In the bus property editor, the following can be configured:

5. Parameter Editor

The parameter editor can be opened for the selected signal or bus under the grid toolbar's edit menu, under the context menu, or by double-clicking your mouse on the row.

5.1. Parameters

The type, output, and idle parameters have dedicated columns in the signal definition grid. For the other parameters, a minimum and maximum value can be specified and linearly changed using the track bar.

The Idle parameter lets you select the signal or bus output while not running.

The output type determines the output behavior of the signals and buses. For OD and OS signals, use external pull-up or pull-down resistors. The output types are:

The possible parameters for different types are the following:

5.2. Custom Plot

The custom plot shows the custom data buffer and allows mouse editing. By pressing a mouse button, the value of the corresponding element in the buffer will be changed depending on the vertical position in the row and on the allowed values. By dragging the mouse, multiple buffer positions can be edited with the same value (all positions between the start and the end of the operation). On a bus waveform, all the signals will be changed to the 0, 1, or Z value. Dragging with the left mouse button and changing the vertical position can change the entered value. Dragging with the right mouse button keeps the initial value.

The Samples allow you to specify the used device sample buffer size. On generation, the buffer is repeated while running.

The Undo and Redo buttons allow you to revert the recent changes.

The Show allows you to select a smaller number of samples than the buffer size starting from the specified value.

5.3. Custom Import

The supported import file types are Comma Separated Values and Tab Delimited Text files.


Static Input/Output

The Static Input/Output (Static I/O) instrument allows easy configuration of input and output devices on the digital lines. It is called “static” because the value from the digital lines corresponds directly to the values generated or read by the input and output devices. Once a signal value is set, it remains in that state until a new value is set.

See the Menu Strips in Common Interfaces.

1. Groups

The Static I/O controls the digital signals of the device, which are managed in groups of eight: 31-24, 23-16, 15-8, and 7-0. The number of I/O signals depend on the device.

The group type is selected using the group menu. For each line group, the following types can be set: Bit I/O, Slider, Progress bar, or 7-Segment, which are explained in the sections below.

2. Bit I/O

This group type assigns a specific control for each of the eight signals in the group. This controls include: LED, Button, and Switch, which are explained in the sections below.

2.1. LED

This is an input device, indicating the digital line's state.

2.2. Button

This is both an input and output device, implementing a push button with LED indicator. The button has two states: pressed and released.

The button types select the output for released and pressed states.

2.3. Switch

This is both an input and output device, implementing a push/pull switch with LED indicator.

3. Slider

The slider configures the eight digital lines according to either the value of the slider caret's position or the value entered in the direct value field. The value is used as an eight-bit binary representation, where the highest number digital line is the most significant bit (MSB) and each digital line gets the value of the corresponding bit.

4. Progress Bar

This type implements an input device used in displaying values between 0 and 255 as a progress bar and value display. The digital values of the eight input lines are converted into a value between 0 and 255. The digital lines' binary values are used as bits in a binary representation where the highest number digital line is the most significant bit (MSB).

5. 7-segment

This type implements an input device for displaying a seven-segment digit and a decimal point. Each of the eight digital lines correspond to one of the segments or the decimal point, according to the legend displayed on the right of the digits display.


Network Analyzer

The Network Analyzer is used to analyze transfer functions (the ratio between an output function and an input function). The Bode plot shows the magnitude and phase of the expressed function versus frequency. See Bode plot for more information.

Typical usage of Network Analyzer: the WaveGen 1 output and Oscilloscope Channel 1 input of the device is connected to the filter input, while the Oscilloscope Channel 2 is connected to the filter output, as shown in the picture below.

When the instrument is started, the Scope and WaveGen are stopped and their status shows Busy. The Network Analyzer takes control over the these instruments while running.

The analysis is performed from start to stop frequency in the specified number of steps. For each step, the WaveGen channel is set to a constant frequency and the Oscilloscope performs an acquisition. Using the frequency transformation result from the index corresponding to the current frequency step, the magnitude and phase value is calculated. The magnitude of Channel 1 (filter input) is calculated relative to WaveGen Amplitude, and the magnitude and phase values of the other channels are relative to Channel 1. The magnitude is expressed in decibels with the 20 * Log10 (gain) formula, where 1x gain equals 0 dB and 2 X gain equals ~6 dB. The phase is plotted with the maximum and minimum value as the one specified for the Phase Offset +/- 180° value.

With Channel set to none under WaveGen options, no WaveGen channel is controlled. The Oscilloscope acquisitions are expecting a custom or external frequency sweep signal. The current frequency step is determined by peak frequency component with a magnitude of at least half of the specified WaveGen Amplitude value.

With Reference set to none under Scope Options, the magnitude for each channel is calculated relative to the set WaveGen Amplitude and no phase calculated.

See Menu in Common Interfaces.

1.1. View

2. Control

The control area lets you adjust the settings for the network analysis.

3. Channels

3.1. WaveGen

The gear tool contains the following:

3.2. Magnitude

3.3. Phase

3.4. Add Channel

Saves a channel as a reference to compare with further analysis.

3.5. Channel

The gear tool contains the following:

3.6. Reference

The Reference options contains the following:

4. Bode Plot

The Bode plot shows the magnitude and phase.

By default, the Channel 1 magnitude is relative to the WaveGen amplitude. The magnitude and phase values of the other channels are relative to channel 1.

The gear tool (in the top-right corner or mouse right-click) contains options for:

4.1. HotTrack

See HotTrack in Common Interfaces.

The corresponding position is marked with a cross on Nichols and Nyquist plots.

4.2. Cursors

See Cursors in Common interfaces.

5. Views

5.1. Time Plot

The time plot shows the oscilloscope acquisition of the last frequency step. This view is used to help adjust the offset and gain of the oscilloscope input channels.

5.2. Nyquist Plot

The Nichols plot is the magnitude and phase plotted in the polar coordinate system.

5.3. Nichols' Plot

The Nichol's plot is the magnitude and phase plotted in the Cartesian coordinate system.

5.4. Cursors

The Cursors show cursor information in table view.

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

6. Export

See Export in Common Interfaces.


Spectrum Analyzer

The Spectrum Analyzer instrument measures the magnitude of an input signal versus its frequency.

The Spectrum Analyzer uses the oscilloscope channels to acquire input signals. Because of this, all instruments that use the oscilloscope channels will cease acquisition when the Spectrum Analyzer begins sampling.

See Menu in Common Interfaces.

1.1. View

2. Control

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

3. Traces

3.1. Magnitude

3.2. Channel

The options in the drop-down menu allow configuration of each oscilloscope channel as follows: Offset, Range, Attenuation, and Sample Mode; and to configure trigger. Having the Auto option for Range, the range is adjusted based on Magnitude Top value.

3.3. Trace

The Add Trance drop-down menu contains:

Up to eight traces can be added. For each trace the following options can be individually configured:

The options drop-down contains the following settings:

4. Plot

The main spectrum plot shows the magnitude versus frequency. About frequency settings see the Control toolbar and Magnitude options.

See Plots in Common Interfaces.

4.1. HotTrack

See HotTrack in Common Interfaces.

Having the mouse cursor in the upper half of the plot, the HotTrack will search and position at a nearby peak. In the lower half of the plot it is not searching for peaks.

4.2. Cursors

See Cursors in Common interfaces.

5. Views

5.1. Time View

The time plot shows the last oscilloscope acquisition. This view is used to help adjusting optimal offset and range for each channel.

5.2. Measurements

The Measurements view shows the list of the selected measurements. The first column in the list shows the channel, the second shows the name, the third shows the measurement value, frequency, and alias frequency for components, along with some other measurements. At the top are Add and Remove and Options drop-down button.

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

The measurement options:

Constant

Dynamic

Where Vmrsi are all bins except peak signal, its harmonics, and DC. The exceptions are the descending slope bins of the earlier mentioned peaks.

Where Vmrsi are the harmonic peak values.

Where Vmrsi are all BINs except peak signal and DC, also excluding bins in the descending slopes of these.

Harmonics

5.3. Components

The components view shows the spectral component list for the chosen trace ordered by magnitude. The count parameter sets the number of component to list.

5.4. Cursors

See Cursors.

6. Export

See Export in Common Interfaces.


Script

The Script window allows execution of WaveForms scripts. The scripting language is JavaScript, based on the ECMA Script standard.

From the script code, objects behind the user interface can be accessed. This allows configuration using the interface and automating parts of it with script.

See Menu in Common Interfaces.

2. Control

The control toolbar allows you to debug and execute the script.

3. Output

The output window contains the print() messages and error log.

4. Code

The instrument's object can be accessed from the script and has the most relevant child objects and parameters in the table below.

The instrument parameters are stored in objects with the following properties:

wait(seconds): Waits the specified number time expressed in seconds. If the value is 0 or if the argument is missing, then the function is ignored. With negative value, it waits until stopped. Returns false when the script is stopped; otherwise returns true.

print(arg0,arg1,…): Prints the arguments to the Output window.

Device

instrument#: common instrument object

Scope#

.Wavegen#

.Analyzer#

.Patterns#

.StaticIO

Supplies

Meter

File(path-name): file object constructor

Tool: helper functions

5. Examples

The following code starts the waveform generator instrument, performs an oscilloscope acquisition, then computes and prints the average value.

Wavegen1.run()
Scope1.single()
Scope1.wait()
var average = 0
var data = Scope1.Channel1.data
data.forEach(function(sample){
  average += sample
})
average /= data.length
print("Average: "+average+"V")

The following code saves the acquisition sample array to a file.

File("C:/temp/acquisition.csv").write(Scope1.Channel1.data)

The following code sets the trigger source and level of oscilloscope instrument based on user input.

Scope1.Trigger.Source.text = Tool.getItem("Source", Scope1.Trigger.Source.preset, Scope1.Trigger.Source.value)
Scope1.Trigger.Level.value = Tool.getNumber("Level", Scope1.Trigger.Level.value)

The following code creates a custom waveform and sets it to be further used.

wave = Array()
for(var i = 0; i < 10; i++){
  wave.push(0)
  wave.push(i/10)
}
Wavegen1.Channel1.Mode.text = "Custom"
Wavegen1.Channel1.Custom.Type.set("MyWave", wave)
Wavegen1.Channel1.Custom.Type.text = "MyWave"

The following code increases the offset level.

Wavegen1.Channel1.Mode.text = "Simple"
Wavegen1.start()
while(!Tool.question("Are we there yet?")){
  Wavegen1.Channel1.Simple.Offset.value += 0.1
  print("Offset: "+ Wavegen1.Channel1.Simple.Offset.text)
}

The following code sets slider for one Static I/O and increments the value twice a second.

StaticIO.Channel0.Mode.text = "Slider"
for(var i = 0; wait(0.5); i++, i%=256){
  StaticIO.Channel0.Slider.value = i
}
StaticIO.Channel0.Mode.text = "Progress" 

SDK and Runtime

The WaveForms installer includes the sdk. The WaveForms SDK is a software development kit for creating custom applications and consists of user manual, examples in Python and C++, and library header file.

The WaveForms installer also includes the WaveForms Runtime. The WaveForms runtime consists of a shared library (dwf) and device support files and is needed for running custom applications.

WaveForms toolkit for LabVIEW

The Digilent WaveForms Toolkit for LabVIEW makes it easy to automate your Digilent instruments with LabVIEW software. This standard API supports Analog Discovery, Analog Discovery II, and the Electronics Explorer, and it includes MSO VIs to set up measurements and acquire data from mixed-signal oscilloscopes, FGEN VIs to output waveforms with the function generator, DIG VIs for reading and writing digital I/O, and PWS VIs for configuring and controlling the power supplies.

A Getting Started with LabVIEW and Analog Discovery 2 guide is provided by National Instruments.