Logging with referenced model
Mostra commenti meno recenti
Hello,
I have a simscape model that I want to run via sim() command for testing purposes. Since I have input data that depends on the model output (feedback) I created a parent model to reference my model in order to keep my base model clean.
For my tests I want to use the simscape logging which is not a problem if I call the child model directly:
>> simOut = sim('myModel', ...
'SaveOutput', 'on', 'OutputSaveName','yout', ...
'SimscapeLogType', 'All', 'SimscapeLogName', 'logData')
simOut =
Simulink.SimulationOutput:
yout: [1x1 Simulink.SimulationData.Dataset]
logData: [1x1 simscape.logging.Node]
SimulationMetadata: [1x1 Simulink.SimulationMetadata]
ErrorMessage: [0x0 char]
But when I call the Parent model the logging seems not to work and the simOut variable misses a logging field:
>> simOut = sim('myParentModel', ...
'SaveOutput', 'on', 'OutputSaveName','yout', ...
'SimscapeLogType', 'All', 'SimscapeLogName', 'logData')
simOut =
Simulink.SimulationOutput:
yout: [1x1 Simulink.SimulationData.Dataset]
SimulationMetadata: [1x1 Simulink.SimulationMetadata]
ErrorMessage: [0x0 char]
It would be great if anybody could help me about that.
Maybe an additional note:
When I run the second model I get these warnings that I don't understand, yet.
Warning: Ignoring settings in the tunable parameters table for model 'myModel' because it references or is referenced by
another model. Run tunablevars2parameterobjects to create parameter objects with the storage class information from the tunable
parameters table.
Warning: Ignoring settings in the tunable parameters table for model 'myParentModel' because it references or is
referenced by another model. Run tunablevars2parameterobjects to create parameter objects with the storage class information from
the tunable parameters table.
UPDATE:
I found out that the problem is not correlated to the sim() command. That's why I changed the title. Actually I added a SignalEditor-Block to the parent model to check thist. The logging is set to "all" and "Open viewer after Simulation" is checked in the configurations of both models (parent and child) but nothing happens after simulation and no simlog variable appears in my workspace.
Risposta accettata
Più risposte (1)
Sahithi Kanumarlapudi
il 24 Set 2019
0 voti
Referring to the following question might help you.
Categorie
Scopri di più su Data Logging in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!