Using an FMU in a while iterator block

Hello,
we try to use an FMU in w "while iterator" block. We import the FMU as model exchange but Simulink gives the following message: 'Validation/While Iterator Subsystem1/FMU' has sample time 0. Only constant (inf) or inherited (-1) sample times are allowed in iterator subsystem 'Validation/While Iterator Subsystem1'.
I thought the communication step size might be the problem. But this parameter cannot be changed in model exchange mode. I also thought that in model exchange mode there cannot be a problem with step size because the FMU gets the step size from the solver.
Thank your very much!

 采纳的回答

I found a solution! I do not know what the problem is exactly. I think the Simulink FMU wrapper is not as powerful as other tools to implement FMU's. I found the following package: https://sourceforge.net/projects/matlab-fmu/. There are functions to implement FMU's in matlab code. It is then possible to execute an FMU in a loop. No error.
Thanks

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Export Simulink Model as Standalone FMU 的更多信息

产品

版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by