LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait until done

Hi,

When I launch a subvi from a vi using a call by reference node, how can I tell it I am not interesting in wait until done, similar to invoke Method:run VI where I can set wait until done to false.

Thanks,

ToNi.
0 Kudos
Message 1 of 19
(5,649 Views)
Afaik, you can't. You have to use the invoke node.
0 Kudos
Message 2 of 19
(5,634 Views)
Yes. Call by Reference is a synchronous call. The Run method on the VI class can be either synchronous or asynchronous.

Steven H.
0 Kudos
Message 3 of 19
(5,626 Views)
My problem is that from one vi I call another subvi and I pass several parameters using a call by reference node. I want from subvi, close reference of the vi but I can't.

Using a invoke node I can't pass parameters to subvi but I don't need to wait until subvi done, but the problem is that I want to call subvi with a call by reference node because I need to pass parameters to subvi but if I use a call by reference I have to wait the subvi to finish execution and then I can't close the vi reference from my subvi.

How Can I do it? I want to pass parameters from my vi to my subvi and from my subvi I want to close the vi that has called my subvi.

Thanks,

A lot of people from here have helped me with a lot of examples, but the problem is that these examples don't work when I pass parameters from my vi to a subvi and from my subvi close the reference of the vi that has called my subvi.

ToNi.
0 Kudos
Message 4 of 19
(5,626 Views)
I need a call by reference asynchronous because I need to pass parameters from my vi to my subvi and I don't want my vi waits the subvi ends his execution (wait until done to false). How can I do it with a invoke method:run ? I know how to make and asynchronous invoke method run but.... I don't know how to call my subvi from my vi and pass parameters to my subvi using an asynchronous invoke method run.

Can anyone help me?

Thanks,

ToNi.
0 Kudos
Message 5 of 19
(5,621 Views)
You can certainly pass parameters to a VI using an invoke node. You use the method Set Control Value. You can also data back from a VI by the method Get Control Value.
0 Kudos
Message 6 of 19
(5,620 Views)
Hi,

but.... I don't know how to do it. I use the method Set control value and I put it before calling the subvi with the invoke method:run and then I set wait until done to false?

Do you have an example? Can you post me an example here please?

Thanks,

ToNi.
0 Kudos
Message 7 of 19
(5,618 Views)
ToNi,

There's a KnowledgeBase entry (38SBDE1E) that describes this technique and provides a screenshot of an example as well. I think that example is exactly what you're after, except that you will wire a False into Wait Until Done.

--John
0 Kudos
Message 8 of 19
(5,606 Views)
Hi,

I have seen the example you post me but.... I don't understand very well something....

From my vi I set the control name with the name of the control in the subvi (input of the subvi) and its corresponent value and then I invoke the run method but LabVIEW tells me the parameter is incorrect.

From my vi I want to pass the parameter to my subvi. In my vi I set the parameter with an invoke node (Set control value [Variant]). I put in the control name, the name of the input control in my subvi because I want to put in this control (input control of my subvi) the value I pass as a parameter. Then I don't need to read the value in my subvi with an invoke node Get control value [variant] because I have put it in my input control (numeric control).

Why it doesn't work?

Something is wrong?

Thanks,

ToNi.
0 Kudos
Message 9 of 19
(5,585 Views)
Why don't you post your subVI and the code you wrote to set the control value. Here's a picture that works for me. I created a VI called Set Control and a numeric control called "Numeric".
0 Kudos
Message 10 of 19
(5,575 Views)