
Signal names in code-generated files contain random suffixes appended to it.
8 views (last 30 days)
Show older comments
Hi,
I'm trying to generate C code from my Simulink model. For a few signals (not all), I see a 5-letter suffix appended to the signal name. For example, a signal named "IVCU_DrvMod" becomes "IVCU_DrvMod_mmra" in the C file. Is this a known issue with Simulink models, and should I be making any changes to my settings to fix this one and for all?
Thanks.
0 Comments
Answers (1)
Altaïr
on 16 Apr 2025
The naming of variables and functions in the generated C code is influenced by the naming rules set within the Identifiers tab in the model's Configuration Parameters.

These rules allow for customization of generated identifiers through the use of identifier naming rules. Such a rule is essentially a macro that includes a mix of literal text, tokens, and token decorators. Depending on the token type, the code generator substitutes the tokens in the macro with specific text values.
For further details on controlling identifier formats, the following command can be used to access more information:
web(fullfile(docroot, 'ecoder/ug/specify-identifier-formats.html'))
This page also provides an example demonstrating how to customize generated identifiers by setting the Identifier format control parameters found in the Identifiers pane within the Configuration Parameters dialog box.
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!