How to avoid 'potential conflicting usages of identifier' error in simulink?
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I have the code generation toolbox installed. I have some variables defined as ExportedGlobal in a block. When I replicate that block in different parts of my model, simulink complains about 'potential conflicting usages'. I discovered that you need to turn off the 'ExportedGlobal' storage class from all variables to avoid that problem, but it is cumbersome to have to do this every time. I would think that the ExportedGlobal should only be meaningful when you are actually generating code and I'm just simulating in Normal mode. Is there an easier workaround than changing the Storage class for all variables every time?
0 comentarios
Respuestas (1)
Kausthub
el 23 de En. de 2024
Hi Romang ,
I understand that you would like to name the variables as “ExportedGlobal” which results in a naming conflict error due to a storage class with the same name. To overcome this error, you do not have to update each variable’s storage class instead you could enable “Ignore Custom Storage Classes” option which is available at Configuration Parameters -> Interface -> Ignore Custom Storage Classes.
You could also refer to this post by MathWorks Support which addresses you exact query:
Hope it helps!
0 comentarios
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!