Filter löschen
Filter löschen

Externally specifiying sample time for referenced models in Simulink

1 Ansicht (letzte 30 Tage)
Guillermo Rubio Gomez
Guillermo Rubio Gomez am 11 Okt. 2019
Kommentiert: Ethan Wu am 31 Mär. 2021
Im trying to use a referenced model whose sample time should be inherit from the parent model that calls it.
However, since there are discrete integrators inside the referenced model, I cannot use the "Ensure sample time independent" option for "Periodic sample time constaint".
Leaving the fixed step size in auto, and "Periodic Sample Time Constraint" in "Unconstrained", it works just sometimes, depending on the parent sample time. I need to sweep the sample time of both models, so I can not just use a value that makes it work correctly.
Now I'm trying to pass a fixed sample time size through the model mask, but apprently that's not working sice the following error appears when trying to simulate:
Invalid dimensions for parameter argument 'st' of Model block
'partentModel/Model1'. The parameter provided is a [0x0] array but a
[1x1] array is expected.
Obviously, st is defined in the parent workspace as a [1x1] array.
Is there any way to achieve this?
Thank you very much for your help.

Antworten (0)

Kategorien

Mehr zu Subsystems finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by