| Contents | Index |
When you select the Generate preprocessor conditionals parameter, consider the following:
The code generation process checks that the inports and outports of a Variant Subsystem block or a Model Variants block must be identical (same port numbers and names) to the corresponding inports and outports of its variants. The build process for simulation does not make this check. Therefore, if your variant block contains mismatched inports or outports, the code generation process issues an error for a model that previously ran.
The code generation process checks that there is at least one active variant by using the variant control variable values stored in the base workspace. If you are generating preprocessor conditionals and using an external header file for the values of the variant control variables, the code generator issues an error if the values in the base workspace do not indicate an active variant.
If you comment out any child subsystems listed in the Variant Choices table in the Variant Subsystem block parameter dialog box, the code generator does not generate code for the commented out subsystems.
![]() | Restrictions on Code Generation of a Variant Subsystem | Limitations on Generating Code for Variants | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |