Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 9, 2010


Feedback


Yes No

Related Links - Developer Zone

Related Links - Products and Services

Moving Examples to Another FPGA Target

8 ratings | 4.00 out of 5
Read in | Print | PDF

Overview

Effectively extract FPGA examples from the example finder.

When you install support for an FPGA target, the installation will include examples. The examples are configured for a specific target and are not necessarily configured for the target you are using. If the examples are configured for a different target, you can still use the examples by copying the items to a new project with a new FPGA target.

In this tutorial, we are going to demonstrate this process using the example called Digital Line Output - cRIO.lvproj. If you want to use a different example, some of the steps will have to be modified for the example you are using. In this exercise, instructions have been added to help you implement this in another example.

  1. Open the NI Example Finder by navigating to Help » Find Examples.
  2. In the middle of the NI Example Finder window, navigate to Hardware Input and Output » CompactRIO »Basic IO.



  3. Open Digital Line Output - cRIO.lvproj.



  4. In the following steps, we are going to add your cRIO to this example.
    1. Right-click Project: Digital Line Output - cRIO.lvproj which will open a menu
    2. Navigate to New » Targets and Devices...



    3. At this point, the Add Targets and Devices on Digital Line Output - cRIO.lvproj. Under the Real-Time CompactRIO folder, select your cRIO. In this example, ReCon-9072-CptPlant will be selected.



    4. After you selected your target, select OK. Now your target should be added to your target.



  5. Now that we have created the new target, we need to move over the VIs and the physical channels used in this example. If you aren't using this example, the steps to change the physical channels will be slightly different depending upon the hardware and example used. Like stated above, there will be extra instructions to account for this.
    1. Expand both CompactRIO targets, Chassis, and FPGA Targets like shown below.



    2. Under the Items to Move folder, Select Digital Line Output.vi and drag it to Mod3 like shown in the picture below.




      Note:
      If you are using a different example, there will be VI or VIs under the folder called Items to Move. Select them and drag them under the module folder like in this exercise.

    3. Now that we have moved the VI, we need to change the names of the Digital Output ports. In this example, it uses four digital lines (DO0, DO1, DO2, and DO3) so we need to rename the digital lines in our module to match. Right-click Mod3/DO0 and select Rename. Type DO0.





      Note: If you aren't using this example, look at the channels used by your example and rename the channels accordingly. For example, if Digital input channels were used with the names DI0, DI1, DI2, and DI3, find the Digital Input channels in your CompactRIO and rename them.

    4. Repeat step 3 until all Digital Output lines have been renamed like shown below:



  6. Now that we moved the VI and changes the channel names, remove the original target by clicking the old target and press Delete.



  7. Recompile the FPGA VI by right-clicking the FPGA VI and selecting Compile.



  8. After the compile has started, the LabVIEW FPGA Compile Server will open stating the status of the compile. When Server Status says Idle, click Stop Server.



  9. After clicking Stop Server, the Compilation Status window will state if the compile was successful. Click Close if it was successful.



  10. If the program includes a host VI, you must update the Open FPGA VI references. To update the references, right-click the Open FPGA VI Reference function, choose Configure Open FPGA VI Reference from the shortcut menu, and navigate to the FPGA VI in the new target



  11. Now that we have completely moved over the example, we need to save all the files in a new directory so we can modify them.
    1. Navigate File » Save as..



    2. In the Save as.. window, select Copy and click Continue...



    3. Save the project in a different location on your machine.
    4. For the VIs in the project, perform the same steps inside the VI and save them in the same location as the project.

  12. Now you have completed extracting the FPGA Examples from the example finder. You can now modify this example for your application without affect the original copies.


Related Links:
Reusing FPGA Objects (FPGA Module)

8 ratings | 4.00 out of 5
Read in | Print | PDF

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).