cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

call vi by reference

Hi,

 

I have a sub vi I need to execute, but I don't want the VI where it is in to wait until it is done. The only way I know to realize it, is opening a reference to this VI and use the 'run VI' invoke node and set 'wait until done' to false.

 

Now I generally never do it this way so I have 3 questions:

 

-Any other way to set 'dont wait until done' ?

-Normally I wire in and outputs to the sub-vi, how does this work with the invoke node

-Can the VI be reentrant without problems?

 

Thank you!

0 kudos
Mensaje 1 de 6
3.394 Vistas
  1. There's no other way.
  2. You can use the VI's Set Control Value method before running it (and yes, this is a terrible way of doing it).
  3. The VI can be reentrant, but make sure you use the reentrant flag when opening the reference to the VI (I believe it's 8. Should be in the help for the Open primitive).

I suggest you vote for this idea, so at some point we can have a better way of doing this:

 

Adding a "(don't) wait until done" option to the Call By Reference node.


___________________
Try to take over the world!
Mensaje 2 de 6
3.378 Vistas

I have to add an information to point 2:

There are several other ways to pass data to that subvi. You don't necessarily have to depend on Ctrl.Set Val.

Mechanics which come to mind are:

- Functional Global Variables (FGV, aka Action Engine)

- Queues/Notifiers

 

There are some other, but either they don't pop up in my mind or i consider them to be "not suggestible".

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Mensaje 3 de 6
3.370 Vistas

Thanks for the help. I'll be using a 1 element queue with a cluster of data in this case, as I need to pass several datatypes.

 

0 kudos
Mensaje 4 de 6
3.363 Vistas

Here's a trick, but it's kind of clunky, and it only works in LV 7.1

0 kudos
Mensaje 5 de 6
3.348 Vistas

 


_Faust wrote:

I have a sub vi I need to execute, but I don't want the VI where it is in to wait until it is done.


Please provide more details. If a subVI needs to run in parallel to the toplevel VI, all you need to do is place the icon on the toplevel diagram and avoid data dependencies to the main code.

 

0 kudos
Mensaje 6 de 6
3.331 Vistas