Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Invoke Node

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info
Download Help (Windows Only)

Invokes a method or action on a reference. Most methods have associated parameters. If the node is configured for VI Server Application class or Virtual Instrument class and reference is unwired, reference defaults to the current Application or VI. Details  

reference is the refnum associated with the object on which you want to invoke a method or perform an action. If the Invoke Node class is Application or VI, you do not have to wire a refnum to this input. For the Application class, the default is the current application instance. For the VI class, the default is the VI containing the Invoke Node.
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
input 1..n are example input parameters of a method.
reference out returns reference unchanged.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.
return value is an example return value of a method.
output 1..n are example output parameters of a method.

Invoke Node Details

To select the class on which to execute the method, wire the refnum to the reference input. For example, to select the VI, Control, or Application class, wire the VI, VI object, or application refnum to reference. The node adapts to the class automatically. You also can right-click the node and select a class from the shortcut menu.

Right-click the node and select Help For Method from the shortcut menu, where Method is the name of the method, for more information about the method and its parameters.

You can get (read) and set (write) the values of the method parameters. Parameters with a white background are required inputs and the parameters with a gray background are recommended inputs.

If the small direction arrow on the parameter is on the right, you are getting the parameter value. If the small direction arrow on a parameter is on the left, you are setting the parameter value. Methods have a short or long name that you can change by right-clicking and selecting Name Format from the shortcut menu. The No Names format displays only the data type for each method.

.NET Invoke Node (Windows)

If you right-click the Invoke Node and select Select Class».NET»Browse from the shortcut menu, LabVIEW displays the Select Object From Assembly dialog box.

On the front panel or block diagram, right-click a .NET object, select Create»Invoke Node, and select a method from the shortcut menu to invoke a method for the object. You also can invoke .NET-specific methods for a .NET object. On the block diagram, right-click a .NET object, select Create»Invoke Node, and select a .NET-specific method from the shortcut menu.

ActiveX Invoke Node (Windows)

ActiveX does not support 64-bit integer data types. If you wire a 64-bit integer data type to a variant parameter of an ActiveX Invoke Node, LabVIEW converts the data type to a double-precision, floating-point number. If you right-click the Invoke Node and select Select Class»ActiveX»Browse from the shortcut menu, LabVIEW displays the Select Object From Type Library dialog box.

On the front panel or block diagram, right-click an ActiveX object, select Create»Invoke Node, and select a method from the shortcut menu to invoke a method for the object. You also can invoke ActiveX-specific methods for an ActiveX object. On the block diagram, right-click an ActiveX object, select Create»Invoke Node, and select an ActiveX-specific method from the shortcut menu.


Resources

WAS THIS ARTICLE HELPFUL?

Not Helpful