Real-Time Workshop Pane: Symbols

Symbols Tab Overview

Select the automatically generated identifier naming rules.

See Also

Symbols Options

Global variables

Customize generated global variable identifiers.

Settings

Default: $R$N$M

Enter a macro string that specifies whether, and in what order, certain substrings are to be included in the generated identifier. The macro string can include a combination of the following format tokens.

TokenDescription
$M

Insert name mangling string if required to avoid naming collisions.

Required.

$N

Insert name of object (block, signal or signal object, state, parameter or parameter object) for which identifier is being generated.

$R

Insert root model name into identifier, replacing any unsupported characters with the underscore (_) character.

Required for model referencing.

Tips

Dependency

This parameter only appears for ERT-based targets.

Command-Line Information

Parameter: CustomSymbolStrGlobalVar
Type: string
Value: any valid combination of tokens
Default: '$R$N$M'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityAny valid combination of tokens
EfficiencyNo impact
Safety precaution$R$N$M

See Also

Global types

Customize generated global type identifiers.

Settings

Default: $N$R$M

Enter a macro string that specifies whether, and in what order, certain substrings are to be included in the generated identifier. The macro string can include a combination of the following format tokens.

TokenDescription
$M

Insert name mangling string if required to avoid naming collisions.

Required.

$N

Insert name of object (block, signal or signal object, state, parameter or parameter object) for which identifier is being generated.

$R

Insert root model name into identifier, replacing any unsupported characters with the underscore (_) character.

Required for model referencing.

Tips

Dependency

This parameter only appears for ERT-based targets.

Command-Line Information

Parameter: CustomSymbolStrType
Type: string
Value: any valid combination of tokens
Default: '$N$R$M'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityAny valid combination of tokens
EfficiencyNo impact
Safety precaution$N$R$M

See Also

Field name of global types

Customize generated field names of global types.

Settings

Default: $N$M

Enter a macro string that specifies whether, and in what order, certain substrings are to be included in the generated identifier. The macro string can include a combination of the following format tokens.

TokenDescription
$A

Insert data type acronym (for example, i32 for long integers) into signal and work vector identifiers.

$H

Insert tag indicating system hierarchy level. For root-level blocks, the tag is the string root_. For blocks at the subsystem level, the tag is of the form sN_, where N is a unique system number assigned by the Simulink software.

$M

Insert name mangling string if required to avoid naming collisions.

Required.

$N

Insert name of object (block, signal or signal object, state, parameter or parameter object) for which identifier is being generated.

Tips

Dependency

This parameter only appears for ERT-based targets.

Command-Line Information

Parameter: CustomSymbolStrField
Type: string
Value: any valid combination of tokens
Default: '$N$M'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityAny valid combination of tokens
EfficiencyNo impact
Safety precaution$N$M

See Also

Subsystem methods

Customize generated global type identifiers.

Settings

Default: $R$N$M$F

Enter a macro string that specifies whether, and in what order, certain substrings are to be included in the generated identifier. The macro string can include a combination of the following format tokens.

TokenDescription
$F

Insert method name (for example, _Update for update method).

Empty for Stateflow functions.

$H

Insert tag indicating system hierarchy level. For root-level blocks, the tag is the string root_. For blocks at the subsystem level, the tag is of the form sN_, where N is a unique system number assigned by the Simulink software.

Empty for Stateflow functions.

$M

Insert name mangling string if required to avoid naming collisions.

Required.

$N

Insert name of object (block, signal or signal object, state, parameter or parameter object) for which identifier is being generated.

$R

Insert root model name into identifier, replacing any unsupported characters with the underscore (_) character.

Required for model referencing.

Tips

Dependency

This parameter only appears for ERT-based targets.

Command-Line Information

Parameter: CustomSymbolStrFcn
Type: string
Value: any valid combination of tokens
Default: '$R$N$M$F'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityAny valid combination of tokens
EfficiencyNo impact
Safety precaution$R$N$M$F

See Also

Local temporary variables

Customize generated local temporary variable identifiers.

Settings

Default: $N$M

Enter a macro string that specifies whether, and in what order, certain substrings are to be included in the generated identifier. The macro string can include a combination of the following format tokens.

TokenDescription
$M

Insert name mangling string if required to avoid naming collisions.

Required.

$N

Insert name of object (block, signal or signal object, state, parameter or parameter object) for which identifier is being generated.

$R

Insert root model name into identifier, replacing any unsupported characters with the underscore (_) character.

Required for model referencing.

Tips

Dependency

This parameter only appears for ERT-based targets.

Command-Line Information

Parameter: CustomSymbolStrTmpVar
Type: string
Value: any valid combination of tokens
Default: '$N$M'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityAny valid combination of tokens
EfficiencyNo impact
Safety precaution$N$M

See Also

Local block output variables

Customize generated local block output variable identifiers.

Settings

Default: rtb_$N$M

Enter a macro string that specifies whether, and in what order, certain substrings are to be included in the generated identifier. The macro string can include a combination of the following format tokens.

TokenDescription
$A

Insert data type acronym (for example, i32 for long integers) into signal and work vector identifiers.

$M

Insert name mangling string if required to avoid naming collisions.

Required.

$N

Insert name of object (block, signal or signal object, state, parameter or parameter object) for which identifier is being generated.

Tips

Dependency

This parameter only appears for ERT-based targets.

Command-Line Information

Parameter: CustomSymbolStrBlkIO
Type: string
Value: any valid combination of tokens
Default: 'rtb_$N$M'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityAny valid combination of tokens
EfficiencyNo impact
Safety precautionrtb_$N$M

See Also

Constant macros

Customize generated constant macro identifiers.

Settings

Default: $R$N$M

Enter a macro string that specifies whether, and in what order, certain substrings are to be included in the generated identifier. The macro string can include a combination of the following format tokens.

TokenDescription
$M

Insert name mangling string if required to avoid naming collisions.

Required.

$N

Insert name of object (block, signal or signal object, state, parameter or parameter object) for which identifier is being generated.

$R

Insert root model name into identifier, replacing any unsupported characters with the underscore (_) character.

Required for model referencing.

Tips

Dependency

This parameter only appears for ERT-based targets.

Command-Line Information

Parameter: CustomSymbolStrMacro
Type: string
Value: any valid combination of tokens
Default: '$R$N$M'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityAny valid combination of tokens
EfficiencyNo impact
Safety precaution$R$N$M

See Also

Minimum mangle length

Increase the minimum number of characters used for generating name mangling strings that help avoid name collisions.

Settings

Default: 1

Specify an integer value that indicates the minimum number of characters the code generator is to use when generating a name mangling string. As necessary, the minimum value automatically increases during code generation as a function of the number of collisions. A larger value reduces the chance of identifier disturbance when you modify the model.

Tips

Dependency

This parameter only appears for ERT-based targets.

Command-Line Information

Parameter: MangleLength
Type: integer
Value: any valid value
Default: 1

Recommended Settings

ApplicationSetting
DebuggingNo impact
Traceability1
EfficiencyNo impact
Safety precaution4

See Also

Maximum identifier length

Specify maximum number of characters in generated function, type definition, variable names.

Settings

Default: 31
Minimum: 31
Maximum: 256

You can use this parameter to limit the number of characters in function, type definition, and variable names.

Tips

Command-Line Information

Parameter: MaxIdLength
Type: integer
Value: any valid value
Default: 31

Recommended Settings

ApplicationSetting
DebuggingAny valid value
Traceability>30
EfficiencyNo impact
Safety precaution>30

See Also

Generating Code for Model Referencing

Generate scalar inlined parameter as

Control expression of scalar inlined parameter values in the generated code.

Settings

Default: Literals

Literals

Generates scalar inlined parameters as numeric constants. This setting can help with debugging TLC code, as it makes it easy to search for parameter values in the generated code.

Macros

Generates scalar inlined parameters as variables with #define macros. This setting makes generated code more readable.

Dependencies

Command-Line Information

Parameter: InlinedPrmAccess
Type: string
Value: 'Literals' | 'Macros'
Default: 'Literals'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityMacros
EfficiencyLiterals
Safety precautionNo impact

Signal naming

Specify rules for naming signals in generated code.

Settings

Default: None

None

Makes no change to signal names when creating corresponding identifiers in generated code. Signal identifiers in the generated code match the signal names that appear in the model.

Force upper case

Uses all uppercase characters when creating identifiers for signal names in the generated code.

Force lower case

Uses all lowercase characters when creating identifiers for signal names in the generated code.

Custom M-function

Uses the M-file function specified with the M-function parameter to create identifiers for signal names in the generated code.

Dependencies

Command-Line Information

Parameter: SignalNamingRule
Type: string
Value: 'None' | 'UpperCase' | 'LowerCase' | 'Custom'
Default: 'None'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityForce upper case
EfficiencyNo impact
Safety precautionNo impact

See Also

M-function

Specify rule for naming identifiers in generated code.

Settings

Default: ''

Enter the name of an M-file that contains the naming rule to be applied to signal, parameter, or #define parameter identifiers in generated code. Examples of rules you might program in such an M-file function include:

Tip

M-file must be in the MATLAB path.

Dependencies

Command-Line Information

Parameter: DefineNamingFcn
Type: string
Value: any M-file
Default: ''

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Parameter naming

Specify rule for naming parameters in generated code.

Settings

Default: None

None

Makes no change to parameter names when creating corresponding identifiers in generated code. Parameter identifiers in the generated code match the parameter names that appear in the model.

Force upper case

Uses all uppercase characters when creating identifiers for parameter names in the generated code.

Force lower case

Uses all lowercase characters when creating identifiers for parameter names in the generated code.

Custom M-function

Uses the M-file function specified with the M-function parameter to create identifiers for parameter names in the generated code.

Dependencies

Command-Line Information

Parameter: ParamNamingRule
Type: string
Value: 'None' | 'UpperCase' | 'LowerCase' | 'Custom'
Default: 'None'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityForce upper case
EfficiencyNo impact
Safety precautionNo impact

See Also

#define naming

Specify rule for naming #define parameters (defined with storage class Define (Custom)) in generated code.

Settings

Default: None

None

Makes no change to #define parameter names when creating corresponding identifiers in generated code. Parameter identifiers in the generated code match the parameter names that appear in the model.

Force upper case

Uses all uppercase characters when creating identifiers for #define parameter names in the generated code.

Force lower case

Uses all lowercase characters when creating identifiers for #define parameter names in the generated code.

Custom M-function

Uses the M-file function specified with the M-function parameter to create identifiers for #define parameter names in the generated code.

Dependencies

Command-Line Information

Parameter: DefineNamingRule
Type: string
Value: 'None' | 'UpperCase' | 'LowerCase' | 'Custom'
Default: 'None'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityForce upper case
EfficiencyNo impact
Safety precautionNo impact

See Also

Use the same reserved names as Simulation Target

Specify whether to use the same reserved names as those specified in the Simulation Target > Symbols pane.

Settings

Default: Off

On

Enables using the same reserved names as those specified in the Simulation Target > Symbols pane.

Off

Disables using the same reserved names as those specified in the Simulation Target > Symbols pane.

Command-Line Information

Parameter: UseSimReservedNames
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Reserved names

Enter the names of variables or functions in the generated code that match the names of variables or functions specified in custom code.

Settings

Default: {}

This action changes the names of variables or functions in the generated code to avoid name conflicts with identifiers in custom code. Reserved names must be shorter than 256 characters.

Tips

Command-Line Information

Parameter: ReservedNameArray
Type: string array
Value: any reserved names shorter than 256 characters
Default: {}

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS