Developing VIs for C Code Generation (C Generator)
- Updated2023-02-21
- 2 minute(s) read
Complete the following steps to develop a VI for C code generation.
- Create a new LabVIEW project in the Project Explorer window.
- Create the VI you want to export for C code generation under the My Computer target in the project. The exported VI must be under the My Computer target in order to generate C code for the VI.

Note You can export only one VI per build specification for C code generation. - As you develop the VI, account for differences in VIs developed to run as LabVIEW applications and VIs you develop for C code generation. Exported VIs and all VIs in their hierarchies support the following block diagram objects differently from VIs running as LabVIEW applications:
- Application Control VIs and functions
- Express VIs
- Data type support
- Fixed-point data types
- Libraries and executables
- Memory Control functions
- Numeric functions
- Signal Processing VIs
- String functions
- Structures
- Timing VIs and functions
- Unsupported VIs and functions
- Support for MathScript RT Module functions

Note You cannot debug an exported VI in LabVIEW. Debug the generated C code in an external IDE. - On the Source Files page of the C Code Generation Properties dialog box, specify the VI you developed in the Exported VI listbox.
After you develop the VI for C code generation, you must customize the platform definition file, define C code generation options, and configure the exported function prototype.
|
|
To view related topics, click the Locate button, shown at left, in the toolbar at the top of this window. The LabVIEW Help highlights this topic in the Contents tab so you can navigate the related topics. |
