How to make an FMU debugging-friendly in Simulink?
We are trying to develop an FMU that is compatible with Simulink. We are using Matlab 2023b+ on Windows x64. The FMU is FMI v3.0 and was originally generated using MSVC 2022 on Windows. The FMU only support co-simulation currently.
We are able to successfully use the FMU using `fmusim`, the executable provided here: https://github.com/modelica/Reference-FMUs . The FMU also correctly works in FMPy https://github.com/CATIA-Systems/FMPy . The FMU also passes the validation check here: https://fmu-check.herokuapp.com/ . However, when we try in Simulink, the simulation stays stuck on t=0.0, i.e. the start. We have added logs to the FMU and are able to see which statement the execution is stuck on, though, the reason for that is not clear.
To solve this, we would like to try to debug by placing breakpoints and view the value of the local variables etc. When trying to use the fmudialog.compileFMUSources we get a few compile errors. How can one better control the exact compile command that is used by compileFMUSources? Is there a way to avoid re-compilation since it was recently compiled with MSVC?We are trying to develop an FMU that is compatible with Simulink. We are using Matlab 2023b+ on Windows x64. The FMU is FMI v3.0 and was originally generated using MSVC 2022 on Windows. The FMU only support co-simulation currently.
We are able to successfully use the FMU using `fmusim`, the executable provided here: https://github.com/modelica/Reference-FMUs . The FMU also correctly works in FMPy https://github.com/CATIA-Systems/FMPy . The FMU also passes the validation check here: https://fmu-check.herokuapp.com/ . However, when we try in Simulink, the simulation stays stuck on t=0.0, i.e. the start. We have added logs to the FMU and are able to see which statement the execution is stuck on, though, the reason for that is not clear.
To solve this, we would like to try to debug by placing breakpoints and view the value of the local variables etc. When trying to use the fmudialog.compileFMUSources we get a few compile errors. How can one better control the exact compile command that is used by compileFMUSources? Is there a way to avoid re-compilation since it was recently compiled with MSVC? We are trying to develop an FMU that is compatible with Simulink. We are using Matlab 2023b+ on Windows x64. The FMU is FMI v3.0 and was originally generated using MSVC 2022 on Windows. The FMU only support co-simulation currently.
We are able to successfully use the FMU using `fmusim`, the executable provided here: https://github.com/modelica/Reference-FMUs . The FMU also correctly works in FMPy https://github.com/CATIA-Systems/FMPy . The FMU also passes the validation check here: https://fmu-check.herokuapp.com/ . However, when we try in Simulink, the simulation stays stuck on t=0.0, i.e. the start. We have added logs to the FMU and are able to see which statement the execution is stuck on, though, the reason for that is not clear.
To solve this, we would like to try to debug by placing breakpoints and view the value of the local variables etc. When trying to use the fmudialog.compileFMUSources we get a few compile errors. How can one better control the exact compile command that is used by compileFMUSources? Is there a way to avoid re-compilation since it was recently compiled with MSVC? fmu, debugging, simulink, co-simulation MATLAB Answers — New Questions