Analog Discovery Student Projects

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Started with LabVIEW and Analog Discovery 2 – NI Edition

Download the LabVIEW Driver for Analog Discovery 2 - NI Edition

 

Introduction

This is a tutorial to get any user started with the example LabVIEW VI’s available for the Analog Discovery 2; with an understanding of the functions used in the examples, users will be able to program custom instruments and analyses with LabVIEW and their Analog Discovery 2. In this tutorial, installation instructions will be given for all the required software, and then an overview of the available examples will be outlined, with 2 of the example VI’s demonstrated in more detail. Please note that the this time, the LabVIEW functions only work for LabVIEW in Windows.

 

Software Installation and Background

Three separate installations are required in order to execute the example VI’s for the Analog Discovery 2:

  1. LabVIEW
  2. Digilent WaveForms 3.1.4 or newer
  3. Digilent WaveForms VI Package

In this tutorial, LabVIEW 2015 and WaveForms 2015 are used.

 

LabVIEW 2015

LabVIEW must be installed before any other software or driver. A link to the installation file can be found at this address:

http://www.ni.com/download-labview/

 

Digilent WaveForms 2015

WaveForms 2015 is the application that accompanies the Analog Discovery 2, and can be downloaded here:

  • Windows
  • Mac (Please note that while Digilent WaveForms 2015 supports Mac, the LabVIEW VI's currently do not work with Mac)

WaveForms is free to use and requires no activation. In order to use the LabVIEW examples demonstrated in this document, WaveForms 3.1.4 or later must be installed.

 

Digilent WaveForms VI’s Package

The WaveForms functions for LabVIEW along with example VI’s can be downloaded as a package on the LabVIEW Tools Network or attached to this tutorial (link).

The WaveForms application is required on the computer before the functions in the package can be used. This package only works with LabVIEW in Windows.

 

Example VI’s

The WaveForms VI’s package includes a comprehensive set of functions that allows you to program instruments for several different devices offered by Digilent, including the Analogy Discovery 2. These functions can be accessed in LabVIEW in the “DigilentWF” menu of the functions palette:

The package also demonstrates the functions with example VI’s that can be found in “\examples\DigilentWF” within the LabVIEW installation path of the PC being used. The examples related to Analog Discovery 2 are:

  • Analog Discovery 2 Power Supplies
  • Bode Analyzer
  • Digital I/O
  • Frequency Sweep Generator and Acquisition
  • Stimulus Response

An examination of the above example VI’s with an Analog Discovery 2 and some prototyped circuits will offer an overview of how the WaveForms functions can be used to build custom instruments. The setup and use of the Digital I/O and Frequency Sweep VI’s are detailed below.

  ad21.jpg

Setting up the Analog Discovery 2

To use the DigilentWF functions and example VI’s, a supported device must be connected to the PC. In this case, an Analog Discovery 2 can be connected to a PC with a USB cord. Once the device is connected, the WaveForms 2015 application will identify it when executed.

The name and serial number of the device connected may be required in some cases for the DigilentWF functions to identify which device to invoke, especially when multiple Digilent devices are connected to the PC. To find this information, open WaveForms 2015 and select “Device Manager” from the “Settings” menu:

ad22.jpg

Beware that the entire string listed in the Serial Number field is used to identify the device, including “SN:” at the beginning of the numbers.

Once the device identification is obtained, the WaveForms application should be closed to avoid conflicting commands to the device.

 

Circuit Prototyping and Device Pin-out

In the two examples demonstrated below, row pin headers and a breadboard are recommended to complete circuits to the inputs and outputs of the Analog Discovery 2:

 AD23.jpg

 

A pinout diagram of the Analog Discovery 2 is shown below for reference:

 AD24.png

Example Code – Digital I/O

The Digital I/O example VI can be found at “\examples\DigilentWF\Digilent_WaveForms_Digital (DIG).vi” within the LabVIEW installation path. To see how the DigilentWF functions are used, open the block diagram view (Ctrl+E):

 AD25.jpg

To demonstrate this VI, connect digital I/O pins 0 through 7 to pins 8 through 15 respectively, as shown in the picture below:

 AD26.jpg

In the VI front panel, enter a device name or serial number to specify a device. If the Device field is left blank, the VI will use the first device found. If an Analog Discovery 2 is the only device connected to the PC, leaving the Device field blank will let the VI function properly.

With the digital I/O pins connected as above, set the input and output fields as illustrated, and click “Run Continuously” on the front panel. Adjust the slider to see the digital input signal change correspondingly.

 AD27.jpg

Example Code – Frequency Sweep

The Frequency Sweep example VI can be found at “\examples\DigilentWF\Digilent_WaveForms_Frequency Sweep Generator and Acquisition (FGEN and MSO).vi” within the installation path. To see how the DigilentWF functions are used, open the block diagram view (Ctrl+E):

AD28.jpg

To demonstrate this VI, connect channel 1 of the waveform generator (W1) to channel 1 of the oscilloscope (1+), and connect the negative input of the oscilloscope (1-) to ground as shown below:

 AD29.jpg

In the VI front panel, enter a device name or serial number to specify a device. If the Device field is left blank, the VI will use the first device found. If an Analog Discovery 2 is the only device connected to the PC, leaving the Device field blank will let the VI function properly.

With the waveform generator and oscilloscope pins connected as above, set frequency sweep parameters as desired, and click “Run” on the front panel to see the frequency of the waveform vary as specified.

AD210.jpg

Additional Resources

Learn more about Analog Discovery 2 - NI Edition

Brian H. -- Electronics & Measurements Product Marketing Manager
Comments
Member Gan.Tang
Member

Hi,everyone:

With analog discovey 1Gen,We post a AD 1Gen Toolkits like below

1111.jpg

 

http://sh-chengtec.com/index.aspx?lanmuid=63&sublanmuid=547&id=482

 

Now you can setup step by step:

步骤1:下载Digilent Waveform 2.7.5

1、Download and setup:Digilent Waveform 2.7.5

链接(link):http://pan.baidu.com/s/1pLyRsNp 密码(pass):ji3a


步骤2:安装LabVIEW 2015 Run-time

Download and setup:LabVIEW 2015 Run-time

http://ftp.ni.com/support/softlib/labview/labview_runtime/2015/Windows/f3/LVRTE2015_f3Patchstd.exe


步骤3:安装HLS.exe (AD_UN)

Download and setup:http://pan.baidu.com/s/1sjY60qx

Password:z6kz


步骤4:使用HLS开始测量

Start your measurement!Have Joy!

http://player.youku.com/player.php/sid/XMTQ0ODkyODI1Mg==/v.swf

 

如有任何问题,请联系4008-218-918或者support.tla@foxmail.com

 

 

Member Gan.Tang
Member

Contributors