How to avoid 'potential conflicting usages of identifier' error in simulink?

13 visualizaciones (últimos 30 días)
romang
romang el 15 de Dic. de 2016
Respondida: Kausthub el 23 de En. de 2024
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?

Respuestas (1)

Kausthub
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!

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!

Translated by