Potential conflicting usages of identifier error in code generation for a reusable function
29 views (last 30 days)
Show older comments
MathWorks Support Team
on 29 Apr 2020
Edited: MathWorks Support Team
on 4 Jun 2024
I am attempting to generate code for a library block that is reused in multiple models in a model reference hierarchy. Why am I getting the error 'Potential conflicting usages of identifier'?
Potential conflicting usages of identifier '<identifier_name>': a global identifier from '<model_reference_A>’. and a global identifier from '<model_reference_B>'
This conflict may be resolved by either increasing the maximum identifier length on the Identifiers pane of the Configuration Parameters dialog box or by changing the name of the conflicting identifier.
Accepted Answer
MathWorks Support Team
on 4 Jun 2024
Edited: MathWorks Support Team
on 4 Jun 2024
A reusable library subsystem ("Reusable function" is selected for the "Function packaging" parameter) with multiple instances in a model or model hierarchy can have more than one function interface. Each function interface corresponding to the same reusable library subsystem must have a unique name or there will be a conflicting identifier. For unique naming, reusable function names have a checksum appended to the reusable library subsystem name. However, some settings for "Function Name Options" and "File Name Options" will prevent the code generator from appending the checksum.
The simplest resolution is to use "Auto" for the function and file name options. For other options that allow customization and still generate unique identifiers, see our documentation on reusable library subsystems.
Library-Based Code Generation for Reusable Library Subsystems:
Generate Reusable Code from Library Subsystems Shared Across Models:
0 Comments
More Answers (0)
See Also
Categories
Find more on Deployment, Integration, and Supported Hardware 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!