| Contents | Index |

| On this page… |
|---|
Code Generation: Data Type Replacement Tab Overview |
Replace built-in data type names with user-defined replacement data type names in the generated code for your model.
This tab appears only if you specify an ERT based System target file.
If your application requires you to replace built-in data type names with user-defined replacement data type names in the generated code:
Select Replace data type names in the generated code.
Selectively specify replacement data type names to use for built-in Simulink data types in the Replacement Name fields.
Specify whether to replace built-in data type names with user-defined data type names in generated code.
Default: off
Displays the Data type names table. The table provides a way for you to replace the names of built-in data types used in generated code. This mechanism can be particularly useful for generating code that adheres to application or site data type naming standards.
You can choose to specify new data type names for some or all Simulink built-in data types listed in the table. For each replacement data type name that you specify:
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
For double, single, int32, int16, int8, uint32, uint16, and uint8, the BaseType of the replacement data type must match the built-in data type.
For boolean, the BaseType of the replacement data type must be either an 8-bit integer or an integer of the size displayed for Number of bits: int on the Hardware Implementation pane of the Configuration Parameters dialog box.
For int, uint, and char, the size of the replacement data type must match the size displayed for Number of bits: int or Number of bits: char on the Hardware Implementation pane of the Configuration Parameters dialog box.
An error occurs if a replacement data type specification is inconsistent.
Uses Simulink Coder names for built-in Simulink data types in generated code.
This parameter enables:
| double Replacement Name |
| single Replacement Name |
| int32 Replacement Name |
| int16 Replacement Name |
| int8 Replacement Name |
| uint32 Replacement Name |
| uint16 Replacement Name |
| uint8 Replacement Name |
| boolean Replacement Name |
| int Replacement Name |
| uint Replacement Name |
| char Replacement Name |
| Parameter: EnableUserReplacementTypes |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | On |
| Efficiency | No impact |
| Safety precaution | No impact |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The BaseType of the replacement data type must match the built-in data type.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.double |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and BaseType of the replacement data type must match the built-in data type |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The BaseType of the replacement data type must match the built-in data type.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.single |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and BaseType of the replacement data type must match the built-in data type |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The BaseType of the replacement data type must match the built-in data type.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.int32 |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and BaseType of the replacement data type must match the built-in data type |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types .
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The BaseType of the replacement data type must match the built-in data type.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.int16 |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and BaseType of the replacement data type must match the built-in data type |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The BaseType of the replacement data type must match the built-in data type.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.int8 |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and BaseType of the replacement data type must match the built-in data type |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The BaseType of the replacement data type must match the built-in data type.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.uint32 |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and BaseType of the replacement data type must match the built-in data type |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The BaseType of the replacement data type must match the built-in data type.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.uint16 |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and BaseType of the replacement data type must match the built-in data type |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The BaseType of the replacement data type must match the built-in data type.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.uint8 |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and BaseType of the replacement data type must match the built-in data type |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be either an 8-bit integer or an integer of the size displayed for Number of bits: int on the Hardware Implementation pane of the Configuration Parameters dialog box.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.boolean |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be either an 8-bit integer or an integer of the size displayed for Number of bits: int on the Hardware Implementation pane of the Configuration Parameters dialog box |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The size of the replacement data type must match the size displayed on the Hardware Implementation pane of the Configuration Parameters dialog box.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.int |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and the size of the replacement data type must match the size displayed on the Hardware Implementation pane of the Configuration Parameters dialog box |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid value |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The size of the replacement data type must match the size displayed on the Hardware Implementation pane of the Configuration Parameters dialog box.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.uint |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and the size of the replacement data type must match the size displayed on the Hardware Implementation pane of the Configuration Parameters dialog box |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
Specify names to use for built-in Simulink data types in generated code.
Default: ''
Specify strings that the code generator is to use as names for built-in Simulink data types.
The name must match the name of a Simulink.AliasType object that exists in the base workspace.
The BaseType property of the associated Simulink.AliasType object must be consistent with the built-in data type it replaces.
The size of the replacement data type must match the size displayed for on the Hardware Implementation pane of the Configuration Parameters dialog box.
An error occurs if a replacement data type specification is inconsistent.
This parameter is enabled by Replace data type names in the generated code.
| Parameter: ReplacementTypes, replacementName.char |
| Type: string |
| Value: name of a Simulink.AliasType object that exists in the base workspace; BaseType property of object must be consistent with the built-in data type it replaces and the size of the replacement data type must match the size displayed on the Hardware Implementation pane of the Configuration Parameters dialog box |
| Default: '' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | Any valid string |
| Efficiency | No impact |
| Safety precaution | '' |
![]() | Code Generation Pane: Code Placement | Code Generation Pane: Memory Sections | ![]() |

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 |