How can I display errors with custom error checking rules like shown in the picture
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos

0 comentarios
Respuestas (1)
Pramil
el 24 de Nov. de 2024
Editada: Pramil
el 24 de Nov. de 2024
Hello Zhiyun,
To create custom checks in Simulink, you can utilize the "Model Advisor" tool. Visit the following link for more information:
The Simulink "Model Advisor" comes with a set of default checks for models, but you can also add your own custom checks. For instructions on how to "Define Custom Model Advisor Checks," please refer to this documentation:
Additionally, you might find this page helpful, as it includes an example you can follow to meet your specific requirements:
Hope it helps.
2 comentarios
Pramil
el 25 de Nov. de 2024
Editada: Pramil
el 25 de Nov. de 2024
Regarding the error, it occurs when Simulink is not able to find a variable, in your case variable named "GeBSW_MCUResetCause_enum", which could be resulted due to:
- Using functions such as "clear".
- Opening new MATLAB session without loading the variable at "base workspace" first.
- Having wrong variable name in "base workspace".
As for the custom rules, can you elaborate on that part? If you want to load data or check if variables are present when model opens, you can write a script for the same in "Modelling->Model Properties->Callbacks->PreLoadFcn".
Ver también
Categorías
Más información sobre Naming Conventions en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!