Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

New VI-Specific Code Generation Options (Microprocessor SDK)

LabVIEW 8.6 Microprocessor SDK Help
June 2008

NI Part Number:
372197B-01

»View Product Info

You now can optimize subVI calls and inline subVIs into callers, which can eliminate overhead and increase code optimization.

  • Optimize subVI calls—Generates C code for subVI calls with as little default data initialization as possible. You cannot debug a VI with optimized subVI calls.
  • Allow inlining—Allows inlining of subVIs into callers. Inlining subVIs is most useful for small subVIs, subVIs called in a loop, or subVIs with only one call site. The default is True. This option only allows inlining. To actually inline a subVI, you must select True from the Inline subVI pull-down menu on the Source File Settings page in the Build Specification dialog box.

For your target to support VI-specific code generation options, you must call LEP_Utilities_GetProjectVISettings.vi, located in the labview\vi.lib\Platform\EmbProject\utilities directory, from LEP_x_CGen.vi, which is located in your target directory. LEP_Utilities_GetProjectVISettings.vi builds a list of all VIs and related code generation settings in a project, which becomes an attribute to the variant that determines how the LabVIEW C Code Generator generates the C code from the block diagram.

To set code generation options for a VI, select File»VI Properties from the front panel window or block diagram window to open the VI Properties dialog box. Select C Code Generation Options from the Category pull-down menu. You can select From project, True, or False. Select True to enable the option and False to disable it. The default is From project, so you only need to set the options in VI Properties if you want to override the code generation settings in the project.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit