Download the Detailed Explanation PDF
When You Want Your Code to Run Without Clicking the Run Button
Having an application run as soon as your RIO device has power can be useful for many applications such as robotics or medical device prototyping. In these instances, you want code to run immediately when the RIO device is turned on.
-
In a LabVIEW project with your RIO device added, right-click Build Specifications and select New»Real-Time Application.
LearnRIO_Getting Started ProjExpl_01 ss.tif
This opens a dialogue that offers many options for real-time code like naming the build specification and choosing where it is saved to on disk. The Local Destination Directory refers to the location on your host PC where the built files are saved to. The Target Destination Directory refers to the location where the built files are saved to on the target. In most cases, these can be left as default.
LearnRIO GettingStarted RTproperties_02 ss.ti
-
Click on the Source Files tab. Here you can choose the VI that you want to run when this application starts.
LearnRIO GettingStarted RTproperties_03 ss.tif
-
Select Build to build the application.
-
Once the application is built, right-click to set the application to run as a startup application.
-
Choose “Run as Startup.”
LearnRIO GettingStarted RTproperties_04 ss.tif
This VI now runs every time the RIO device has power. You no longer need to connect the RIO device to a host PC to run the code.
When You Want to Share a Bitfile or Change a Bitfile’s Properties
Every time an FPGA VI is compiled, a bitfile is created. This file contains the raw compiled FPGA code. This can be very useful if you want to share compiled code with a friend. By using the bitfile, you do not have to share the entire project with all the VIs. You can simply email them the bitfile.
One thing to note is that bitfiles are compiled for specific RIO configurations. If you change chassis or NI Single-Board RIO devices or use different modules than what the bitfile was compiled for, it becomes incompatible.
-
Right-click on any FPGA build specification, select properties, and review the options available.
LearnRIO GettingStarted RTproperties_05 ss.tif
You can name the FPGA bitfile and choose the location where it is stored. Additionally, if a friend shares a bitfile with you, you can point an Open FPGA VI Reference to a bitfile.
When You Want to Change the Location of Your Code
If you create a new VI and add it to the project, save it in the same directory or subdirectory as the project. This helps when you’re trying to share your project with a colleague. You can just share the entire folder that the project is saved in and know that you have captured all of your content. If you save VIs in completely different directories, possibly even on different drives, you may have difficulty moving your project at a later date.