Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime errors #33

Closed
tkorvola opened this issue Jan 14, 2020 · 2 comments · Fixed by #34
Closed

Runtime errors #33

tkorvola opened this issue Jan 14, 2020 · 2 comments · Fixed by #34

Comments

@tkorvola
Copy link
Contributor

If the Simulink model detects a runtime error, is there any way for it to report the error that would work in the compiled FMU? assert and error appear essentially unsupported by Matlab Coder.

@tkorvola
Copy link
Contributor Author

tkorvola commented Feb 4, 2020

assert may not work, but apparently Simulink assertion blocks do (also limit checkers etc.): Simulink Coder generates calls to utAssert, which is a macro expanding to nothing by default, but that can be changed. One could have it set a flag that eventUpdate would check.

@tkorvola
Copy link
Contributor Author

tkorvola commented Mar 2, 2020

Another way of indicating an error is for a C S-Function to call ssSetErrorStatus. That does not work at all, nor do I know how to make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant