LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 10/18/2010

Cool LabVIEW 2010 Features Part X: SubVI Inlining

 

We now have the ability to eliminate subVI call overhead by inlining our subVI calls:

 

subviinline.png

 

Normally, subVI overhead is a negligible part of the overall execution time of your VIs.  But if you have subVIs that are called many times within a tight loop, you may see a performance benefit by inlining those VIs.  This is basically a way to tell the LabVIEW compiler to compile the code within a subVI as if it were present on the calling VI's diagram.

 

There are some VIs that cannot be inlined.  If you attempt to set this option on one of those VIs, you will get a warning symbol next to the checkbox, and your VI will be broken.  You can view the Error list for the VI to see a specific explanation as to why your VI cannot be inlined.  Some of the most common reasons that inlining may be disallowed on your VI include:

 

  • Debugging is enabled
  • Your VI is non-reentrant
  • Your VI contains property or invoke nodes

If you have VI Analyzer Toolkit 2010, there is a test called "Inlinable VIs" that will flag any non-inlined VI that could benefit from having inlining enabled.

Message 1 of 17
(11,216 Views)

This is nice....!! thanx for sharing this bit of information.....Smiley Happy


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 17
(11,158 Views)

Is inlining disallowed if there are any property or invoke nodes or, for example, if there are property or invoke nodes that refer to the front panel of the inlined subVI?

 

Tim

Message 3 of 17
(11,056 Views)

I have the Professional Development Suite but my VI Analyzer doesn't show a "Inlinable VIs" test (or I couldn't find it in the variety of tests listed).  Is this an add that you have to buy?

0 Kudos
Message 4 of 17
(11,044 Views)

mysticfree - The screenshot is from VI Properties, not the VI Analyzer.

 

Tim

 

0 Kudos
Message 5 of 17
(11,033 Views)

This nugget refers to a feature introduced with LV 2010. It can be found in the Analyzer task in the area Blockdiagram >> Performance.

 

If you cannot find it there, i would think that you do not have VI Analyzer 2010.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 17
(11,032 Views)

Thanks, Norbert.  I found it.  I also made the mistake of having "show only failures" in the results windows so the inline VI test portion didn't show up there either. 

0 Kudos
Message 7 of 17
(11,011 Views)

 


@tstahl wrote:

Is inlining disallowed if there are any property or invoke nodes or, for example, if there are property or invoke nodes that refer to the front panel of the inlined subVI?


In LabVIEW 2010, inlining is disallowed for *any* property or invoke nodes.  We are investigating making the check more granular in future LabVIEW versions.

 

Message 8 of 17
(10,991 Views)

This feature is not to be confused with the JKL right  mouse click option "Inline SubVI", which literally (and neatly) converts the VI to code onto your diagram. Different but the same, kinda.

Richard






Message 9 of 17
(10,786 Views)

 


@broken Arrow wrote:

This feature is not to be confused with the JKL right  mouse click option "Inline SubVI", which literally (and neatly) converts the VI to code onto your diagram. Different but the same, kinda.


AFAIU (...understand) thi is not really 'the same' as it puts a copy of the code into the callers BD, while inlining keeps the callee alone. Maybe like a macro for text-based compilers?

 

0 Kudos
Message 10 of 17
(9,433 Views)