LabVIEW C Generator Module

Source File Settings Page (C Code Generation Properties Dialog Box)

  • Updated2023-02-21
  • 2 minute(s) read

Requires: C Generator

Use this page of the C Code Generation Properties dialog box to set individual C code generation options for each VI in the hierarchy of the exported VI. You must select a VI to see the code generation options.

If you select From project for a property listed in the VI Settings text box, the VI uses the setting you specified on the C Code Generation Settings page.

This page includes the following components:

  • Project Files—Displays the tree view of items under the target in the Project Explorer window.
  • VI Settings—Appears if you select a VI in the Project Files tree. Specifies the properties for the VI. The default values use the property settings for the project.
    • Generate guard code—Generates extra code to prevent common coding mistakes that can cause an application to crash or function incorrectly. For example, guard code can prevent dividing by zero or indexing out of range in an array. Guard code makes an application slightly larger and slower.
    • Use stack variables—Uses stack variables rather than heap variables to represent signals in the generated C code. Using stack variables enables better C compiler optimizations and makes the C code faster.
    • Expression folding—Generates better performing and more efficient code by collapsing groups of nodes into single expressions that are recognized easily by C compilers. If you overrun the bounds of an array or divide by zero, the application in which you use the generated C code might crash.
    • Generate integer only—Generates C code without any floating-point operations.
    • Inline subVI—Allows inlining of the subVI into callers, which can eliminate overhead and increase code optimization. Inlining a subVI is most useful for a small subVI, a subVI called in a loop, or a subVI with only one call site.

Log in to get a better experience