Why can't i suppress the simulink warning Simulink:p​rotectedMo​del:protec​tedModelMe​xWrongPlat​formSimCod​eGenWithWe​bview?

조회 수: 2 (최근 30일)
I wonder why i am not able to suppress the following simulink warning:
--> Simulink:protectedModel:protectedModelMexWrongPlatformSimCodeGenWithWebview
Simulink.suppressDiagnostic(gcb,'Simulink:protectedModel:protectedModelMexWrongPlatformSimCodeGenWithWebview')
With this i got the following response in commandline:
"The message identifier Simulink:protectedModel:protectedModelMexWrongPlatformSimCodeGenWithWebview cannot be suppressed."
Is there another way to hide or suppress this warning or are there limitations on suppressable warnings?

채택된 답변

R
R 2024년 6월 25일
In Simulink, certain warnings are designed to be non-suppressible due to their importance or potential impact on model integrity and simulation results. The warning Simulink:protectedModel:protectedModelMexWrongPlatformSimCodeGenWithWebview appears to be one of those warnings that cannot be suppressed using the standard Simulink.suppressDiagnostic function.
The warning appears related to the use of protected models and MEX files that were generated on a different platform and causing/potentially causing compatibility issues.
It is better to resolve this error, i.e., if you have access to the original model, regenerate the protected model and MEX files on the current platform.
You can try the following but this will be applied across current MATLAB session:
warning('off', 'Simulink:protectedModel:protectedModelMexWrongPlatformSimCodeGenWithWebview')
  댓글 수: 1
Philipp Krause
Philipp Krause 2024년 6월 28일
Thanks for the quick answer. i will try this.
Some additional background information: I want use a protected model on both, windows and linux, so i generated two seperate protected models for every platform and switched between them by a variant subsystem depending on the OS. Unfortunately i get this warning although the unrelevant model is not active (commented out).

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by