From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Basic VI Server question - can you 'feed' new inputs to a VI's controls *while it's running*?

Solved!
Go to solution

Well, this'll seem totally basic to you all, but I can't find exactly what I'm looking for.  I want to display a splash screen while my application does thru startup, showing each step, then when I'm all set up, kill the splash screen VI.  So I thought I might be able to 'feed' new strings to the VI, then 'feed' a STOP input to it, just as if I clicked the button on the panel.  But I can't see a method or property that'll let me do that.  Am I being thick-headed? VI's attached - thanks for your attention! paul

Download All
0 Kudos
Message 1 of 6
(2,692 Views)
Solution
Accepted by topic author PaulOfElora

Imagine you have a VI that you run as a Dialog (so it just sits there showing whatever is on its Front Panel).  Make it a State Machine that runs on a timer (or follows commands from a Queue) to update the Front Panel Message as your code loads (in case you want multiple Splash messages), then have it exit after displaying the last Message.  Run it in parallel with the rest of your program, starting it at the beginning and allowing it to "go out of existence" when it times itself out.  No need for VI Server, Start Asynchronous Call, etc.  Indeed, you can make the entire Splash a sub-VI that is basically the State Machine, with Error In (and Error Out) so you start it when you want on the Main routine.  It runs in parallel for, say, 15 seconds (or however long you program it) and then exits.

 

Bob Schor

Message 2 of 6
(2,660 Views)

Many ways to do what you want, if it was me, I would probably use a queue to pass strings to the splash screen. So, in your launcher, create a string typed queue. Then add a string queue as a control in your splash screen VI. Pass the queue reference into the start asynchronous call node, then use it to pass strings to the splash screen. You can also use it to kill the splash screen - when you're done, just destroy the queue. In your splash screen, if the queue returns an error, stop.

0 Kudos
Message 3 of 6
(2,658 Views)

The simplest way to do what you want is the Control Value:Set method of the VI class.

a.png

 

0 Kudos
Message 4 of 6
(2,639 Views)

You could use a queue with a string for the data. This would avoid your splash screen uselessly running as fast as it can.

Annotation 2019-12-09 225857.png

Download All
0 Kudos
Message 5 of 6
(2,621 Views)

You guys are great! Don't know what sort of cobwebs were clogging my brain, but the queue is definitely the most natural solution.  Thanks $10^6 for your quick response! paul

0 Kudos
Message 6 of 6
(2,592 Views)