This is an old revision of the document!


DSDB Programming Guide

This section demonstrates how to create a LabVIEW project and FPGA VI that performs the following:

  • Routes switch SW0 to LED0, which causes LED0 to light when switch SW0 is moved to the ON position, and turn off when the switch moved to the OFF position.
  • Routes push button BTN0 to LED2, which causes LED2 to light when button BTN0 is pressed, and turn off when the button is depressed.

This example also demonstrates how to compile and run the FPGA VI on the DSDB.

Prerequisites

Hardware

  • SDB

Software

  • LabVIEW 2015 or newer
  • LabVIEW FPGA
  • NI Xilinx Tools
  • NI-DSDB

Procedure

To begin programming with LabVIEW, connect the USB cable to the DSDB, apply power to the board, and move the power switch to the ON position.

  1. Launch LabVIEW.
  2. In the Getting Started window, click Empty Project. The new project opens in the Project Explorer window.
  3. Save the project as FPGA_Design.lvproj.
  4. In the Project Explorer window, right-click My Computer and select New»Targets and Devices.
  5. In the Add Targets and Devices on My Computer window, select New target or device, expand ELVIS, and highlight DSDB. Click OK. The target is discovered and the target and target properties are loaded into the project tree.
  6. In the Project Explorer window, right-click FPGA Target (Board1, DE FPGA Board) and select New»FPGA I/O. The New FPGA I/O window opens.
  7. In the Available Resources pane, expand Slide Switches and select SW0. Click Add to move SW0 to the New FPGA I/O pane. This adds this FPGA resource to the project.
  8. Expand Push Buttons and select BTN0. Click Add to move BTN0 to the New FPGA I/O pane.
  9. Expand LEDs and select LED0 and LED2. Click Add to move the LEDs to the New FPGA I/O pane.
  10. Click OK. Notice that the selected FPGA resources were added to the FPGA Target tree in the Project Explorer window.