필터 지우기
필터 지우기

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

조회 수: 13 (최근 30일)
romang
romang 2016년 12월 15일
답변: Kausthub 2024년 1월 23일
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?

답변 (1개)

Kausthub
Kausthub 2024년 1월 23일
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!

카테고리

Help CenterFile Exchange에서 Naming Conventions에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by