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.


Wednesday, March 05, 2008

VI Server References

In today's video, I answer the question "why doesn't the VI in the picture above work?"

Although a seemingly simple question, the answer involves some advanced VI Server topics, including the "lifetime" of VI references.

While putting together this video, I found a lot of other potential topics for future posts (e.g. What's a "This VI" reference? What's the difference between a subVI call, the Run VI method, and a Call by Reference node?) If you have other questions on this topic, please feel free to post a comment and I'll try to get you an answer!

- Christina

PS Here's the same video on YouTube in case the other link doesn't work for you.