programmatically collect sim errors
显示 更早的评论
I would like to collect up the errors and warnings related to a model simulation. Help docs have run me down the sldiagviewer.diary rabbit hole to record such to a diary file. (Looking for a better solution here as this is just plain klunky). The sldiagviewer doesn't collect the errors when using the sim function however. Weird and why doesn't the sim command return errors? So I use the set_param function to 'push' the run button. That collects in the diary file but one of simulink's annoying features is that the .m file doesn't wait for the sim command to complete (please don't suggest a pause timer) so when I go to close, the close_system fails. I do see a 'wait' associated w/yet another rabbit hole known as Simulink.Simulation.Job but I gotta think there's a better way.
Thanks,
-Chris
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Event Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!