LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run VI versus Call by Reference

I noticed that when you do Run VI you have the option of specifying whether or not you want to wait until the VI is done. I need to pass in a parameter so I'm using the Call by Reference node instead but I can't find the property that will allow me to specify if LabVIEW should wait until the sub-VI is completed or not. In this case I don't want it to. Is there a way around this?

Message Edited by Gary D on 07-11-2005 09:27 AM

0 Kudos
Message 1 of 9
(2,675 Views)
You have to use the Run invoke node and pass parameters to the VI using either the Set Control Value or Set Control Value [Variant] method.
0 Kudos
Message 2 of 9
(2,669 Views)


@Dennis Knutson wrote:
You have to use the Run invoke node and pass parameters to the VI using either the Set Control Value or Set Control Value [Variant] method.



I just tried that and I'm not sure if I set it up correctly. I'm now getting Error 42 at the invoke node. Its reason is listed as a General Error.
 
Using the Variant thing works more. I get no errors but I also don't see my VI (have show FP on load and call wired as true). I think I can figure the rest out on my own. Thank you.

Message Edited by Gary D on 07-11-2005 10:02 AM

Message Edited by Gary D on 07-11-2005 10:02 AM

0 Kudos
Message 3 of 9
(2,667 Views)
Any ideas on getting the FP to show? Like I said earlier I have the ShowFPOnCall and ShowFPOnLoad properties both wired to true. If I tell the Run VI invoke node to wait until done the VI begins running but I can't see it. I have to open the VI to see it running and put in my inputs. I checked the VI's properties and it says show when called/loaded in their as well. Any suggestions?
0 Kudos
Message 4 of 9
(2,661 Views)
If you want to open the front panel, first use the Open FP method and then the Run method.
Message 5 of 9
(2,655 Views)

You can also place a property node with a FP.Open property before or after running the VI and set it to T.

As for getting the right value, make sure you have the right name (case matters) and data type for the control and that you use Flatten to String.


___________________
Try to take over the world!
0 Kudos
Message 6 of 9
(2,655 Views)


@Dennis Knutson wrote:
If you want to open the front panel, first use the Open FP method and then the Run method.



That was it. Thank you. I should have been using the Open FP method instead of the ShowFPOnCall/Show properties. Thank you for the help.
0 Kudos
Message 7 of 9
(2,645 Views)
I have one more issue with this. I have the FP opening and it the rest of the program doesn't wait for the completion of the VI, but upon completion of the VI being opened, its FP stays open despite it being set to "Close Afterwards if Originally Closed" in its properties. I know there's the Close FP method but if I put that in anywhere, it will close the FP despite whether or not the VIs operation is completed. Do these methods simply override the VIs properties? Is there any other way to do what I'm asking besides Close FP? Thanks for any help.
0 Kudos
Message 8 of 9
(2,630 Views)

Well I did what I could have sworn I tried to do in the first place and it behaves exactly as I want it to so go figure. Thanks for the help you guys provided.

Gary

0 Kudos
Message 9 of 9
(2,621 Views)