LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front Panel Dilemma

I am using Run VI invoke node to run a VI that is reentrant and for passing a single paramter to the same I am using set control node. Now the calling VI will be an exe when packaged and needs to run as an NT service wherein I am not allowed to use any UIs. The set control would not work otherwise is what I presume -I mean without a front panel being loaded for the called VI. Please assist in finding a work around or correcting me if I am wrong in my assumption.
0 Kudos
Message 1 of 4
(2,852 Views)
sumitrishi wrote:
> I am using Run VI invoke node to run a VI that is reentrant and for
> passing a single paramter to the same I am using set control node. Now
> the calling VI will be an exe when packaged and needs to run as an NT
> service wherein I am not allowed to use any UIs. The set control would
> not work otherwise is what I presume -I mean without a front panel
> being loaded for the called VI. Please assist in finding a work around
> or correcting me if I am wrong in my assumption.

There should be no problem with that. In order to pass the value with
Set Control Value you need to prevent the application builder to
actually remove the front panel resource. No need to display that front
panel at all, which makes your Windows Service application conform
ing
just as much.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 4
(2,852 Views)
I have to set the auto dispose preoperty to 'true' and wait until done to 'false'. So if I dont have the application builder include the front panel ( which is what I want exactly) then would the reference be not closed by itself ?
How can I prevent it from happening ? Do I have to do it programatically by making the VI hold a reference to itself till the time that running instance is required? I think I tried this but it does not work. If you feel that it should have worked then I might try again. My program actually is a kind of server that spawns a new thread everytime a request comes from the client and this server needs to be running as a windows NT service . The hierarchy on the server side is that it runs a re-entrant VI (that has a control o
n the front panel that need to be set at the time of spawning).
0 Kudos
Message 3 of 4
(2,852 Views)
sumitrishi wrote:
> I have to set the auto dispose preoperty to 'true' and wait until done
> to 'false'. So if I dont have the application builder include the
> front panel ( which is what I want exactly) then would the reference
> be not closed by itself ?

You have to leave the panel in the application as otherwise you won't
even be able to open and run the VI.

> How can I prevent it from happening ? Do I have to do it
> programatically by making the VI hold a reference to itself till the
> time that running instance is required? I think I tried this but it
> does not work.

Yes leave the frontpanel in the build, open inside the VI as soon as
possible a VI refnum and you can even set Frontpanel.Open of that refnum
to False to make sure it is
really invisible. Keep the VI refnum open
inside a shift register until you are ready to shutdown, but don't close
the VI refnum until after you have properly disposed any other possible
resources. Once the internal VI refnum is gone while no front panel is
visible, (it must be present in the built nevertheless for VI server to
be able to start it up as independant task), your VI will abort
immediately even if the diagram still contains code to execute to close
files, VISA resources, etc.

> If you feel that it should have worked then I might try
> again. My program actually is a kind of server that spawns a new
> thread everytime a request comes from the client and this server needs
> to be running as a windows NT service . The hierarchy on the server
> side is that it runs a re-entrant VI (that has a control on the front
> panel that need to be set at the time of spawning).

One more reasone to NOT remove the front panel. If you remove the
frontpanel you can't use methods
such as Set Control Value to manipulate
the control value as it is really not present at all.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 4
(2,852 Views)