Call By Reference

From LabVIEW Wiki
Jump to: navigation, search

The Call By Reference Node is used to call VIs with a specified connector pane, but without exactly specifying the VI at edit time. It can be used to provide a plug-in architecture within an application, where the actual plug-in can be choosen at runtime. The number of and the specific plug-ins can be changed at any time after the calling application has been finished.
The VI Reference used with Call By Reference must be a strictly typed reference, which can be obtained using the Open VI Reference Node.
Aside of the VI Reference and the Error Cluster flow-through connectors, there is a specific connector pane that relates to the strictly typed VI Reference, both with the connector pane and with their data types. You can wire to these terminals just as you would to a normal subVI.

Be aware that calling a VI with the Call By Reference Node involves a small overhead compared with a normal SubVI call, due to validating the VI reference and some other bookkeeping. This is, however, insignificant with all but very small VIs when used on local machines. It can become a problem with frequent calls to remote machines.