VI Analyzer Enthusiasts Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Test - Poly Instance Inventory

Observe the following diagram:

123.png

 

These are three subVI calls to the same polymorphic VI, which defines three different instance VIs. If we edit the polymorphic VI to remove "Instance 2" and save the poly VI, this block diagram then becomes:

133.png

 

LabVIEW does not break your VI, or in any way notify you of the instance change... it simply changes the now-removed instance to be the next instance in the list (in this case, "Instance 3"). This peculiar behavior of the editor can cause code to execute differently without any notice to the developer.

 

The attached VI Analyzer test attempts to provide a mechanism to detect these changes. The test has two modes of operation:
cfg.png

 

In Generate Inventory mode, a log file is created that stores the currently-selected instance of every polymorphic subVI call in the analyzed codebase. In Test Codebase mode, the poly subVI calls are compared to the stored instance names in a specified log file, and a test failure is returned for any instances that do not match.

 

The test is saved in LabVIEW 2018. Follow the instructions here to install and use this test.

Contributors