LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 09/07/2010

Cool LabVIEW 2010 Features Part V: Scripting

 

VI Scripting is a way to programmatically create, modify, and inspect the contents of a VI front panel, block diagram, or connector pane.  Here's a highly summarized history of VI Scripting:

 

  • LabVIEW 6.0 - Scripting was added as an internal feature.  For many, many LabVIEW releases its use was limited to internal NI developers, or external customers who figured out how to crack it.
  • LabVIEW 8.6 - Scripting became available as a separate download on ni.com, but was not officially supported by NI.
  • LabVIEW 2010 - Scripting becomes an official core feature of LabVIEW.  No more separate downloads or underground hacking required.

 

So now that VI Scripting is included in LabVIEW 2010, it is enabled via Tools > Options > VI Server:

 

scriptingtoolsoptions.png

 

Upon enabling scripting, you will gain access to the following items:

 

  • A new Functions > Programming > Application Control > VI Scripting palette
  • Scripting-specific classes (Node, Structure, etc.) in VI Server
  • Scripting properties and methods associated with scripting-specific classes in VI Server

If you enable the sub-item in the screenshot above, you will start seeing helpful scripting information in the context help window for VIs and functions:

 

scriptingcontexthelp.png

 

The connector pane pattern for subVIs is displayed next to the subVI title, and the terminal index of each node terminal is displayed next to the terminal name.  Note that these terminal indices are shown for built-in functions as well.

 

The most common use of VI Scripting is to create tools that enhance the LabVIEW editing experience.  The following tools/features make heavy use of VI Scripting:

 

 

 

Message 1 of 1
(6,042 Views)