FlexLogger Plugin Development Kit – NI Tools Network Supplement
Overview of licensing and distribution
FlexLogger plugins are built into LabVIEW packed libraries, which helps protect plugin developers’ IP. However, the FlexLogger Plugin Development Kit does not natively include any licensing tools. This section describes an approach to integrating the NI License Manager Third-Party SDK into a FlexLogger plugin.
The NI License Manager (NILM) Third-Party SDK is available on ni.com or directly through VI Package Manager. Installing the NILM SDK allows plugin developers to get started experimenting with licensing integration – as the SDK includes an example license file.
The following steps describe the licensing approach taken in the attached “Licensing Example” plugin. Given the state management described in the FlexLogger Plugin Development Kit manual, a plugin’s Initialize.vi provides a natural entry point for a plugin to prompt users for activation. In the example, an NILM session is opened and used to activate the plugin. The customer’s resulting action then drives the plugin’s behavior:
Depending on the License status returned by Activate License.vi, the plugin performs two actions:
The plugin then checks the licensed? value to determine if it should execute any business logic. For example, the “Licensing Example” plugin skips all the execution logic in Configure Session.vi, Process.vi, and Cleanup Session.vi.
The “Licensing Example” requires the developer manually or programmatically moves the *.lc file to ...ProgramData\National Instruments\License Manager\Licenses\ and moves the *.xml file to ...ProgramData\National Instruments\License Manager\ProductInfo\ . Additionally, the plugin uses the example license that ships with the NILM SDK. For a FlexLogger plugin distributed via the NI Tools Network, the Licensing Third-Party Products with the NI License Manager API for LabVIEW describes the process to obtain a unique license file.
With the plugin and license files in the expected location (covered in detail in the Distributing FlexLogger Plugins section), users can seamlessly license plugins from within the FlexLogger application.
After adding the plugin in the Channel Specification, the NILM activation window launches and allows users to activate their plugin:
If the user cancels out of the licensing dialog, the “Licensing Example” plugin adds channels that notifies users they have a licensing problem:
If the plugin is activated, then the licensing dialog will stop appearing when users add an instance of the plugin and the plugin starts operating as expected:
FlexLogger Plugin Development Kit Manual
Creating Stand-Alone LabVIEW Applications Licensed by NILM
NI License Manager Third-party SDK
Licensing Third-Party Products with the NI License Manager API for LabVIEW
LabVIEW 2019 added the ability to build packages compatible with NI Package Manager and SystemLink. With the 1.0 FlexLogger Plugin Development Kit only supporting LabVIEW 2019 64-bit, packages provide a distribution option that integrates well with the NI platform.
When creating a new plugin, the FlexLogger plugin wizard scripts a packed library build specification (File>>Create Project….>> FlexLogger IO Plugin) that the FlexLogger application can consume. Building the plugin’s packed library is a required step before a package containing that packed library can be built.
Add a new Package build specification to the plugin’s LabVIEW project.
In the Destinations category, three different destinations are required:
In Source Files, move the license files to their corresponding directories and the packed library to the new IOPlugins directory.
In Package Attributes, specify the desired naming and contact information. Add the plugin's licensing information using a *.rtf file and the Include custom license agreement build option. Ensure Display in NI Package Manager when filtered by products is selected.
In Dependencies, change the Filter options to All visible options and select FlexLogger. This option will prompt users to install FlexLogger if it is missing on their system. The FlexLogger application must be installed before it will appear in the Related packages list.
Once any other change have been made to the build specification, the packages should be tested locally and on a separate FlexLogger test machine.
The above configuration builds two separate NI Package files (*.nipkg) are built, one for the plugin and one for the custom license agreement. For local testing, the build specification's Add to feed option will build a feed you can use to install the plugin via NI Package Manager:
To simulate testing on a customer machine, use NI Package Manager to create a feed from the command line. That feed can then be used to install the plugin. This approach mimics how the NI Tools Network distributes FlexLogger plugins via ni.com.
Once the package is installed, customers will be able to add the plugin to FlexLogger systems. Additionally, customers can upgrade and remove the plugin directly from NIPM.
LabVIEW Help: Creating Packages for Distribution
NI Package Manager Help: Install Packages from a Feed