LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running Independent VI's

Following up one of my earlier posts, asking how to call a VI from a base
VI, and then have the two running independently of each other, I have done
it like this:

1. Open an Application Reference
2. Open a VI Reference
3. Used a Property Node, with Open the front panel.
4. Used an Invoke Node, with Run VI, with False wired to wait till done

So, this gets the VI's front panel open, and running, independent of the
caller VI.

Now there are a couple of problems.
Is there any way I can pass a variable (int) to the subVI...
I need to pass the int to tell the VI how to set itself up.

I also have a setup that sets up a reference to a VI, opens and runs it,
then runs another sub VI, but when the bottom level sub VI finishes, the
middle VI
stops but stays open... (Do you understand?) is there anyway
around that?



--
Slade Squire
Programmer
Rectifier Technologies Pacific
Melbourne, Australia
SladeSquire@rtp.com.au
0 Kudos
Message 1 of 5
(2,520 Views)
> 1. Open an Application Reference
> 2. Open a VI Reference
> 3. Used a Property Node, with Open the front panel.
> 4. Used an Invoke Node, with Run VI, with False wired to wait till done


You don't need to open an Application Reference unless you want to control

a LV on another computer.


It is much easier passing parameters, and especially getting return

values if you Call the subVI rather than using the

Run method, but Run has the option to not wait until completed. To pass
parameters or control it after running, you use the Set Control Value
method on the VI reference. So, after Opening the reference, set the
control values, then open the panel and run the VI.

When you launch a parallel VI like this, you need it to take
responsibility
of a few things.

If the panel of the subVI is not open, you want to open a reference to
itself so that it will stay running when the calling VI completes.

You may also want it to close its own window when it is finished.

It is just as if you opened the VI and ran it by hand. Either the VI
closes its window or you have to.


Greg McKaskle
0 Kudos
Message 2 of 5
(2,520 Views)
LabVIEW Technical Resource Vol. 9 No. 1 (latest edition), pg. 9, has a good
example of opening a sub-vi using the VI server. It includes the points
Greg mentions below.

"Greg McKaskle" wrote in message
news:3BFBB4DF.6090807@austin.rr.com...
> > 1. Open an Application Reference
> > 2. Open a VI Reference
> > 3. Used a Property Node, with Open the front panel.
> > 4. Used an Invoke Node, with Run VI, with False wired to wait till
done
>
>
.. . .
>
> When you launch a parallel VI like this, you need it to take
> responsibility of a few things.
>
> If the panel of the subVI is not open, you want to open a reference to
> itself so that it will stay running when the calling VI completes.
>
> You may also want it to close its own w
indow when it is finished.
>
.. . .
0 Kudos
Message 3 of 5
(2,520 Views)
And where can I find the Technical Resources?


"D D"
wrote in message
news:plSK7.894$uP4.83205237@newssvr16.news.prodigy.com...
> LabVIEW Technical Resource Vol. 9 No. 1 (latest edition), pg. 9, has a
good
> example of opening a sub-vi using the VI server. It includes the points
> Greg mentions below.
>
> "Greg McKaskle" wrote in message
> news:3BFBB4DF.6090807@austin.rr.com...
> > > 1. Open an Application Reference
> > > 2. Open a VI Reference
> > > 3. Used a Property Node, with Open the front panel.
> > > 4. Used an Invoke Node, with Run VI, with False wired to wait till
> done
> >
> >
> . . .
> >
> > When you launch a parallel VI like this, you need it to take
> > responsibility of a few th
ings.
> >
> > If the panel of the subVI is not open, you want to open a reference to
> > itself so that it will stay running when the calling VI completes.
> >
> > You may also want it to close its own window when it is finished.
> >
> . . .
>
>
0 Kudos
Message 4 of 5
(2,520 Views)
http://www.ltrpub.com/ Back issues are $25 a copy.

"Slade Squire" wrote in message
news:9thfr4$4o4$1@perki.connect.com.au...
> And where can I find the Technical Resources?
>
>
> "D D"
wrote in message
> news:plSK7.894$uP4.83205237@newssvr16.news.prodigy.com...
> > LabVIEW Technical Resource Vol. 9 No. 1 (latest edition), pg. 9, has a
> good
> > example of opening a sub-vi using the VI server. It includes the points
> > Greg mentions below.
> >
> > "Greg McKaskle" wrote in message
> > news:3BFBB4DF.6090807@austin.rr.com...
> > > > 1. Open an Application Reference
> > > > 2. Open a VI Reference
> > > > 3. Used a Property Node, with Open the front panel.
> > > > 4. Used
an Invoke Node, with Run VI, with False wired to wait
till
> > done
> > >
> > >
> > . . .
> > >
> > > When you launch a parallel VI like this, you need it to take
> > > responsibility of a few things.
> > >
> > > If the panel of the subVI is not open, you want to open a reference to
> > > itself so that it will stay running when the calling VI completes.
> > >
> > > You may also want it to close its own window when it is finished.
> > >
> > . . .
> >
> >
>
>
0 Kudos
Message 5 of 5
(2,520 Views)