Skip navigation

Community

Currently Being Moderated

LabVIEW Scripting

VERSION 33  Click to view document history
Created on: May 28, 2009 2:34 PM by Jeff_M1 - Last Modified:  Nov 12, 2013 5:30 PM by Michael_Aivaliotis

Note: Scripting is include with LabVIEW 2010 - 2013. No extra download or activation is needed.  Simply enable in your Tools>>Options Dialog.

What is VI Scripting?

 

VI 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 you to create new VIs, Front Panel controls, Block Diagram objects and wires as well as traverse diagram object hierarchies and modify code.

 

 

Installation Instructions

For Windows:  Download the Windows installer from this page (XP or Vista/7).  32- and 64-bit versions refer to your LabVIEW version, not your OS.

You need to activate VI Scripting before the feature is available in LabVIEW.

  1. Select Start >> Programs >> National Instruments >> NI License Manager to open NI License Manager.
  2. Expand the Local Licenses, LabVIEW, and Toolkits items to display the Scripting Development item.
  3. Right-click the Scripting Development item and select Activate to open the NI Activation Wizard.
  4. Select the Automatically activate through a secure Internet connection option and click Next. Enter the provided serial number (L12S86758) and click Next.
  5. Follow the remaining steps in the NI Activation Wizard.

 

 

For Mac/Linux: No activation is required (disregard steps 1-5 from above), download the Mac/Linux installer from the following download page.

 

 

Documentation and Examples

Getting Started documentation is located at the following path ...\labview\manuals\VI Scripting Getting Started.pdf

Examples are located at the following path:  ...\labview\examples\VIScripting

  • Drop Add Function.vi – Demonstrates how to create a block diagram object. Programmatically creates a new VI and drops an Add primitive on it.
  • Drop Add Function Inside While Loop.vi – Demonstrates how to create a block diagram object in a nested diagram. Programmatically creates a While Loop, then creates an Add primitive inside the loop.
  • Drop Round Button.vi – Demonstrates how to create a Front Panel control. Programmatically creates a Round Button Boolean control.
  • Drop Digital Numeric Inside Cluster.vi – Demonstrates how to create a nested Front Panel control. Programmatically creates a Cluster with a Numeric inside it.
  • Random Strip Chart.vi – The Random Strip Chart is a common “Hello World” program in LabVIEW. Programmatically generates and runs a VI that writes random numbers to a strip chart in a while loop.
  • Random Strip Chart with Diagram Cleanup.vi – Instead of worrying about the diagram layout while creating objects, this version of the example drops everything at (0,0) then runs the Diagram Cleanup tool programmatically to clean up the block diagram code.
  • Add Control to Connector Pane.llb/vi – Demonstrates how to associate Front Panel controls with the Connector Pane for use as a SubVI.
  • Connector Pane Pattern Reference.vi – This VI is provided as reference documentation. It shows which connector pane pattern number corresponds with which layout, as well as the numerical index for each item in the pattern.

 

Technical Support

 

As this is an "NI Labs" product, NI will not be supporting LabVIEW Scripting through Applications Engineering.  All technical issues should be posted on the API Community.

 

 

Future Version Support

 

 

The Scripting API is subject to change between LabVIEW versions. NI makes no guarantees that any feature or behavior associated with the Scripting API will either exist, migrate automatically, or have a functionally equivalent behavior in different versions of LabVIEW.

More Resources

Getting Started with Automating Code Development with LabVIEW Scripting

Write a Plug-In for the JKI Right-Click Framework

Attachments:
Comments (52)