LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone please give me the crash course on VI servers?

Hi,

I have about two months under my belt as far as labview experience is concerned... I have created a few projects that I'm bringing together with a menu. When I try to execute more than one sub-vi at a time, the first is the only one that executes. Now I understand that the loops are not completing their execution, so labview retains it's focus on them and the other vi's can't be called until I close these loops. I have read other posts in the forums where people have had the same problem I'm having but I didn't find any reponses that I fully understood. I know that the VI server seems to be the right solution but I'm not sure that I understand what it is nor what it does... Could someone please give me a plain explanation of what a VI server is? Also, any examples that could be posted (files, block diagrams, etc.) would really be appreciated!
Thanks a bunch!

Ryan
0 Kudos
Message 1 of 4
(2,500 Views)
Without going into all the gory details, the VI Server basically allows you to get a reference to an object, be it LabVIEW itself, or a VI that resides on disk or in memory. Then, with that reference you can set properties or invoke methods, sort of like ActiveX. For example, when you have a reference to a VI you can execute the "Run" command. This is essentially similar to opening the VI and clicking on the run button. Or, you can specify whether to make the front panel visible or not. You can use a reference to the LabVIEW application to set general properties, like the ones that are in the "Tools->Options" dialog.

For example, here's some simple code that dynamically runs a VI:



That said, there's plenty of documentation that ships with LabVIEW and also many examples that ship with it. This is the first place to look. There are also examples on the NI web site.

Message Edited by smercurio_fc on 01-26-2007 08:59 AM

0 Kudos
Message 2 of 4
(2,489 Views)
VI server is the backbone of LV, it is the communicating centre of the program.
What you are looking for is dynamic calling into a VI. Open a VI reference to the VI then run the VI with the method 'RunVI', and set do not wait on finish to true.
Use LV2 globals to communicate between the VI's.
EDIT:
Or look at smercurio's post Smiley Sad

Ton

Message Edited by TonP on 01-26-2007 04:01 PM

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 4
(2,486 Views)

Thanks a bunch! I have seen many of these express VI's before but I wasn't sure about their usefullness. I'm going to try what you have suggested and I'll post back once I have some results! Thanks again,

Ryan

0 Kudos
Message 4 of 4
(2,463 Views)