In addition to importing source code onto a LabVIEW NXG block diagram, you can reuse existing applications and algorithms developed in other languages by calling them from a LabVIEW NXG application. For instance, if you have an existing C/C++ shared library and need to reuse it in LabVIEW NXG, you can call it using the Shared Library Interface (SLI). To make importing external libraries simple, LabVIEW NXG includes the Shared Library editor, which assists you in building a LabVIEW NXG SLI for incorporation onto the LabVIEW NXG block diagram.
Figure 1: Use the Shared Library editor to map existing libraries for use in LabVIEW NXG.
Figure 2: Use the Shared Library Interface to reuse existing C or C++ shared libraries in-line with G programming.
Use the C Node to import, write, and execute your existing C code with a familiar text-based development experience including function auto-complete and context help. You can call functions from the following libraries in the C Node:
For more information, see the C Node Overview.
Figure 3: Use the C Node to integrate and edit C code in LabVIEW NXG.
To enable complete reuse of your existing MATLAB® code, LabVIEW NXG includes an Interface for MATLAB. Developers can point to their MATLAB function or script saved on their computer and connect it to their LabVIEW block diagram. The Interface for MATLAB has full support for MATLAB toolboxes, as it calls into a licensed copy of the MATLAB software installed on the same computer as LabVIEW NXG.
Reference the Interfaces for MATLAB Help Topic for more details.
The .NET Framework allows you to access Windows services such as the performance monitor, event log, and file system as well as advanced Windows APIs. Or you may have existing .NET code or drivers that you wish to reuse in your LabVIEW NXG application. You can integrate a .NET assembly from the Global Assembly Cache (GAC) into your LabVIEW NXG application using the .NET Interface Document (.dni).
Select the .NET namespaces and classes you want to use in your application and then new palette items are created for them that you can access from your .gvi block diagram. These new palettes contain properties and methods that are entry points to the .NET assemblies and can be wired like nodes in your code to exchange data.
Figure 4: Use the .NET Interface Document in LabVIEW NXG to incorporate .NET Assemblies from the Global Assembly Cache (GAC).
The Python programming language has grown in popularity across virtually all industries and is becoming increasingly used in test and measurement applications. What has helped make Python appropriate for the test and measurement space is its ability to integrate with NI hardware and software to leverage its scripting strengths with NI's rich measurement expertise.
Click here to learn about all the available Python Resources for NI Hardware and Software.