Polymorphic VI
This article or section needs to be updated. Some information on it may be out of date, and should not be relied on. Please improve this article if you can. |
This article or section needs to be wikified to meet LabVIEW Wiki's quality standards. Please help improve this article with relevant internal links. |
Contents
Polymorphic VI
A polymorphic VI is a VI without any code but can be used to group several normal VIs into one VI. A developer can choose during edit mode which VI should be executed during runtime.
Usage
A polymorphic VI is used to execute the same operation on different file-types or to return different file types
Selection
Selection of a specific VI can be done automatically based on the data-types connected to the in/output terminals of the VI. To show the manual selector, right-click the polymorphic VI icon an a block diagram, select 'Visible Items\Polymorphic VI Selector'
Configuration
The configuration of a polymorphic VI is done by selecting 'Open Polymorphic VI' after a right click on the icon on a block diagram.
In the configuration dialog you can edit the Polymorphic VI, add or remove VIs. Alternatively it is possible to show the icon of the instance instead of the icon of the polymorphic VI. It is possible to let the selection be done automatically. The selector can be shown by default.
Configuration of an instance
By using the 'Edit name...' button on the configuration dialog the following dialog opens:
The 'Menu Name' is shown in the selector after an instance is selected. The 'Polymorphic VI Selector Name' you can alter the menu shown by the VI selector. Levels can be made by using a colon (:) as separator.
Limitations
- All VIs of a polymorphic VI must have the same Connector Pane pattern, or the Polymorphic VI will be broken.
- Using the polymorphic VI will load all VIs into memory.