Sunday, March 30, 2008

What is VI Server?

After my last post, I got a question from some new LabVIEW users: "What exactly is VI Server?"

In a strange coincidence of timing, there is brand-new session for NI's LabVIEW Developer Education Day that covers VI Server in detail:
Build Plug-in Architectures and Custom User Interfaces with VI Server goes into detail on using VI Server technology to alter the properties and methods of applications, as well as how to build plug-in, extendable architectures. Demos include creating user interfaces that restrict access based on user or application status, advanced graph displays, and creating executables that can be built on after creation.
You can check the locations and times for this free event at

It's a great session, but since not everyone will get to see it, I will try to answer the question in my own words. The VI Server features of LabVIEW give you programmatic access to the properties and methods of controls, indicators, VIs, and even the LabVIEW application itself.

It's pretty powerful stuff. You can use it to show/hide controls, change the window style of your VI, run VIs locally or on other computers, and much more.

The general distinguishing feature between VI Server and "normal" VI diagram code (which typically deals with manipulating data) is the use of VI Server references. You open a reference to the item you need to use (e.g. VI, control, or application), you read/write properties or invoke methods, and then you close the reference. As I noted briefly in my last post, you have to be careful about closing references correctly. LabVIEW will automatically close references when your top-level VI stops running, but erroneously open references can cause problems while your VIs are running, including excessive memory usage and holding unneeded VIs in memory.



Anonymous Pat Allen said...

This was my favorite session from Developer Day. I took a lot away from this one.

12:43 PM, April 18, 2008  

Post a Comment

<< Home