Building and Managing Applications and Libraries in LabVIEW NXG
Updated Mar 5, 2019
LabVIEW NXG adds the ability to create reusable source libraries and build applications. The value of sharing reusable code across projects, developers, and machines is often equally as important as the code's logic itself, whether for improving efficiency within your company or sharing with the community. Also, the ability to protect your source by distributing binary applications is key for projects where, for example, you may have code deployed in a run-time-only environment that many users will operate over a long period.
What can you create using the LabVIEW NXG Application Builder?
You can create and build desktop applications (executables) and reusable source libraries. Additionally, you can build headless applications that run at startup on NI Linux Real-Time controllers – such as the USRP-2974 – if you are using LabVIEW Communications System Design Suite. Source libraries are used to share code with colleagues through a network or cloud drive, email, or using Software Configuration Management tools. A colleague can then open and use that source library and any accompanying palette presenting the VIs on their machine.
Figure 1. Creating a Library in LabVIEW NXG
What’s new or different in the LabVIEW NXG Application Builder versus the LabVIEW 2017 Application Builder?
In LabVIEW 2017, you create applications by defining a build specification for how to build source under a specific target. In LabVIEW NXG, you can create a new application or library from scratch or by selecting the source you want to include in your application or library. This creates a .gcomp document, and the settings formerly configured in the build specification are now selected and stored in the configuration pane of that library or application .gcomp document.
In LabVIEW NXG, you have greater control over grouping and organizing source files through the ability to define multiple namespaces for libraries and built application outputs. In LabVIEW 2017, you can define only one namespace level for libraries and classes.
Figure 2. Matching Disk Hierarchy for Library Shown in Figure 1
LabVIEW NXG also streamlines large project management. Within SystemDesigner, you can see all the software applications and libraries in your project, view location on disk, manage versions, move them between targets, and build.
Figure 3. Viewing Software on Your Development Machine in SystemDesigner
Build Lighter Package Installers
In LabVIEW, when an installer is created all dependencies are copied and included in the distribution. In LabVIEW NXG, users can build a package installer that does not copy any dependencies to the output. Instead, the package installer will use NIPM to download and install exact versions of all its dependencies – the entire hierarchy – that it was built with. This allows you to distribute a smaller sized installer and enables you to designate specific dependency versions for your package installer to use. To meet that requirement, it may downgrade or upgrade installed packages on the target machine, so it is only recommended for installing on clean machines.
Figure 4. Create a smaller sized installer that uses NIPM to download and install exact versions of all its dependencies.
Designate NIPM Feeds
To fully take advantage of creating lighter package installers, you may want to place internal dependencies in a feed on your company network for others to download. In LabVIEW NXG, users can create feeds and distribute packages using feeds. A package published using this feature could be listed in NI Package Manager, deployed to distributed systems through SystemLink, or used by any of the other Package Manager related technologies.
Figure 5. Designate NIPM Feeds to distribute packages.
Deploy Applications on NI Linux Real-Time with LabVIEW Communications System Design Suite
LabVIEW Communications System Design Suite combines LabVIEW NXG with tools that are specifically created to help you rapidly prototype wireless communications systems. With NI Software Defined Radios (SDRs) and PXI, you have support for certain NI Linux Real-Time controllers to enable deterministic algorithm deployment, access to the Linux community, and Ethernet control of SDRs. You can create an application that runs headlessly at startup on a controller such as the NI USRP-2974 or a PXIe-8135 with NI Linux Real-Time installed. You are recommended to benchmark your real-time VIs interactively first, but you can then set the application to run headlessly at startup in SystemDesigner (Figure 6).
Fig. 6 Configure a real-time application to run at start-up on a support real-time controller.
Get Started Creating Your First Application and Library
You probably noticed we have a new look, but our focus remains on you. We've expanded our offerings to better serve you so that you can take on the complex challenges facing humanity today, tomorrow, and for the next 100 years. It's time. Let's Engineer Ambitiously.