MATLAB Answers

Setting Simulink signal logging settings without modifying the model

1 ビュー (過去 30 日間)
Robert 2016 年 11 月 23 日
I have a large Simulink model configured to log certain signals including some inside referenced models. I see that I can use a Simulink.SimulationData.ModelLoggingInfo object to alter the signal logging settings of those signals or to disable logging for them. By passing this object to the sim command, I can run the model with my new signal logging specifications entirely from a script.
It seems this can only be used to modify or disable signal logging; is there a way to add signals to log programmatically without modifying the model or its referenced models?
For context: I am operating a large hierarchy of Simulink models and need to record different sets of signals for various tests. I would like to be able to instrument the model for a given test entirely within a script. That must include adding signals to log and should include disabling the logging of signals I don't need. I feel like this should be possible without modifying the model. I don't mind if it causes Simulink to re-build the model (I expect this will have to be the case), but I hope for a solution that doesn't involve saving changes to the system.
In other words, I want to separate the model design from the test framework and am finding it difficult to configure signal logging without making model modifications. Can this be done?

  0 件のコメント


回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by