Developer Center Resources

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a LabVIEW Development Tool

Creating a Tool for LabVIEW

» Creating a LabVIEW Developement Tool

Many LabVIEW add-ons are tools for the Development Environment.  These types of add-ons can be implemented as external applications or as tools inside of LabVIEW.  Tools usually use VI Server, and can also incorporate LabVIEW Scripting and menu integration.  This document will address the general issues of designing and implementing a LabVIEW tool.

VI Server

The VI Server is very important for many LabVIEW Tools. The Server contains a set of functions that allows you to dynamically control VIs and the LabVIEW environment.  Some of the primary uses of VI Server in LabVIEW tools:

  • Dynamically load VIs - This can reduce the calling VI or executable's size and launch time.
  • Retrieve information from LabVIEW - For example, VI Server can be used to find all VIs in memory or LabVIEW's root directory.
  • Edit VI Code Programmatically - Scripting adds functionality into VI Server and allows you to edit the code of VIs programmatically and generate new code.

viserver.png

The LabVIEW Help contains detailed information on VI Server:

  • Building VI Server Applications – This document introduces the basics of VI Server, such as property, methods, and basic functions.  Read this document if you are not familiar with VI Server.
  • Capabilities of the VI Server – This help document details the primary use cases for VI Server.  Read this document if you would like an illustration of the most common and practical uses of VI Server.
  • VI Server How-To – This document lists many step-by-step guides for VI Server, and is very useful for new users.  Ensure you are familiar with the tasks described here before building a large project using VI Server.

It is important to have a solid understanding of VI Server before using more advanced features of VI Server, such as remote VI Server or LabVIEW Scripting.

Remote VI Server

For some applications, an external program may need to communicate with LabVIEW and access VI Server functions. An application, shared library (dll), or .NET assembly may be built in LabVIEW to achieve this.

remoteviserver.png

To communicate with LabVIEW through VI Server from an executable or running on the same machine, ensure localhost has Machine Access for the VI Server in LabVIEW.  You must also have VI Server access to all VIs.  By default, LabVIEW allows remote VI Server access to all VIs via localhost.

When an external program invokes VI Server remotely a limited number of functions are available.  The LabVIEW Help marks these limited properties and methods as “Remote access disallowed”.  For example, see the help for the All VIs In Memory property.  These properties and methods can, however, be called from a VI running inside of LabVIEW.

See the example Calling Internal LabVIEW Properties Externally for more information.

VI Scripting

LabVIEW Scripting enables users to write a LabVIEW program that can generate and inspect LabVIEW code. It exposes many additional VI Server classes, properties, and methods. It allows users to create new VIs, Front Panel controls, Block Diagram objects and wires as well as traverse diagram object hierarchies and modify code.  LabVIEW Scripting can currently be downloaded at the LabVIEW APIs Community.

scriptingconnectwire.png

There are a number of resources available for Scripting:

  • Scripting Download - LabVIEW Scripting is available for Windows, Mac OS, and Linux.  The download includes examples and a Getting Started guide.
  • Automating Development with Scripting - This document and accompanying videos illustrate the power of Scripting, and can help you get started with practical applications of Scripting.
  • LabVIEW API Community - This community contains a discussion forum dedicated to Scripting, as well as many examples and documents.

Custom Menu Items

It is also possible to add custom items to the a few of LabVIEW menus: File, Tools, and Help.  These menu items can give the end-user quick access to your add-on.

See the document Integrating into the LabVIEW Menus for details and instructions.

custommenu.png

Create Project Templates

If your customers would benefit from starting development with a project template, complete with template code and preconfigured target systems, we recommend creating Project Templates.  Please review the following article:

Using Custom Templates and Sample Projects to Develop LabVIEW Projects

Chris Bolin
LabVIEW Partner Program, CLA
Comments
Jim_Kring
Active Participant Active Participant
Active Participant
on

Hey Chris: It's worth mentioning that when integrating into the menus, the "<labview>\wizard" folder only adds to the File menu of VIs, it does not add to the File menu of the LabVIEW Project Explorer window.  I might classify this as a bug.

JKI Blog
chris.b
NI Employee (retired)
on

Hey Jim - thanks for bringing that up! We went ahead and added that clarification to the Integrating into the LabVIEW Menus doc.

Chris Bolin
LabVIEW Partner Program, CLA
Contributors