LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you recieve errors from invoke node

I am using invoke node to open a VI.  The VI that I open has error in and error out clusters wired into its icon terminals.  When I open the VI it performs as it should except for returning errors along the error out data line.  When I run the VI without the use of invoke node I can capture the induced errors.
 
Thanks in advance
Tim C.
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 1 of 5
(3,056 Views)
If you want access to the terminals of a subVI when you run it dynamically you should use the Call By Reference node instead of the Invoke node.  The Call By Reference node is in the Application Control palette, right near the Invoke Node.  You can read the LabVIEW Help for more information about using the Call By Reference node.  On disadvantage of using Call By Reference is that the function will not return its outputs until the subVI has finished executing.  This is different from the Run VI method, which has the option to return immediately upon calling the invoke node.
 
Hope this helps,
-D
0 Kudos
Message 2 of 5
(3,044 Views)

I reworked the Sub VI call so it was happening through a Call By Reference.  It forwarded the error as desired.  I also read the help section on both.  But I am still not seeing what the difference is between the two.

 

I see the Call by refeerence will pass the error but do not understand why an invoke node VI Run Method does not pass the error especially since it has the error in and error out terminals.

 

 

1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 3 of 5
(3,037 Views)

I went back and added a Type Specifier to the Invoke Node RUN VI method and once I did that it started passing the error though.

 

What is the signifigance of the type specifier when the invoke Node is used to Run VIs?  I ask this because the Invoke node will

Run the VI without the Type Specifier being linked to teh terminal input.

 

Thanks in advacne

Tim C.

1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 4 of 5
(3,036 Views)

Hi Tim,

Generally you use the Run VI method when you want to launch a VI separately from the main app, like if you wish to pop up a VI as a dialog for getting information from the user, or if you want to run a VI in the background while your main app is running.  You would use Call By Reference to dynamically call a VI as a subVI...Call By Reference is used when you want access to a VI's connector pane as if you were calling it as a subVI, but you don't want the static link to the subVI in your main VI.  An example of this would be a plug-in architecture, where you have several subVIs with the same connector pane, and you might want to call a particular one based on some specific case in your code.

Hope this helps,

-D

0 Kudos
Message 5 of 5
(3,030 Views)