The VI, ActiveX, and Web Servers

What does the error message "VI is not in appropriate state for the invoke node" mean?
<Rolf Kalbermatter" rolf.kalbermatterATciteng.com>
(Timeless)

This is known error, but I wouldn't call it a problem. It's just how LabVIEW works. A lot of the methods for a VI reference can not be executed for VIs which are either in a reserved state or already running. When a VI is running is rather obvious but a reserved state means that the VI is either part of a running hierarchy of VIs (usually your application) or a strict typedefed VI reference is open to it. The reasons for this are not so simple but it comes down to protecting the VI from influences from different caller types. The Run function (amongst others) is asynchronous as it starts the VI but not necessarily waits for termination of the VI. An implicit reference to the VI as an icon in your block diagram or an explicit one in the form of a strict typedef to be used with the Call by Reference Node are synchronous as far as the caller is concerned.

You may eventually try to use the Call by Reference Node instead. If you need for whatever reasons to use the Run method you MUST make sure that the VI is not an explicit part of your application by not adding its icon anywhere in your app (and not opening a strict typedefed reference to it either).

(back)

How do I minimize a caller VI while a subVI is running?
<Urs Lauterburg urs.lauterburgATphim.unibe.ch>
(Sep 2000)

If you would like to minimize the caller VI, for example if you have a main VI that does essentially nothing while the subVI that it calls is executing, you need to reference your calling VI. So upon calling your subVI the first action would be to open a reference to your calling VI and size its front panel appropriately by using the VI Property Node. Then when exiting the subVI after completing execution you can restore the calling VI's front panel to its original size and close the reference.

(back)

How do I enable the Web Server in a built application?
<Niels Harre nhaATdhi.dk, Roland.Kaenzig roland.kaenzigATwifag.ch>
(April 2000)

Yes it is possible to enable the web-server in a built application. First include the two dll's "lvjpeg.dll" and "lvpng.dll" in the same directory as the run-time engine or the application. Second make an ini file of the application with the key "WebServer.Enabled=True" in the section of the application-name. For example if myapp.exe was the name of the application then the ini file would be called myapp.ini and contain the section "[myapp]. Thirdly, you may include an access-list with the key "WebServer.TcpAccess="+*.dhi.dk;-*.com", and a root-path where your htm documents can stored "WebServer.RootPath=<path>" (where <path> is a normal windows path e.g. c:\myapp).

Note: you can also use 127.0.0.1 or localhost in your access list.

(back)