No input/output terminals to FMU block

4 views (last 30 days)
Akhtar Zeb
Akhtar Zeb on 10 Sep 2019
Edited: Michael Taylor on 3 Apr 2020
I am able to export Simulink’s FMU and it works fine in OMEdit (OpenModelica Connection Editor). However, while importing a FMU to the Simulink enviornment using the Simulink’s FMU Block, there are no input & output terminals to the block (model in figure) for visualizing the results or connecting it to the other blocks/components.
Do you have any ideas how does this work?FUM block terminals.jpg
Sincerely, Akhtar

Answers (1)

Abhilash Padma
Abhilash Padma on 6 Nov 2019
I think you are using a different block. Use “FMU import” block from “Simulink Extras” library. Refer the following documentation to know more about this block:
Michael Taylor
Michael Taylor on 3 Apr 2020
Edited: Michael Taylor on 3 Apr 2020
Hi Danielle,
In case you are still trying to resolve this, or for anyone else also stuck at this point:-
You are able to provide input and output ports by adding input or output connectors to the OpenModelica model, e.g. those from Modelica.Blocks.Interfaces or connectors that inherit from these. These are added in OpenModelica before carrying out the steps as listed above. It seems as though editing the block structure should preferably be done pre-export, rather than making amendments to the FMU itself. Another thing to note is that open connectors in sub-models do not seem to be picked up by Simulink. If you want these to be accessible as ports in Simulink, you can connect them to connecters added to the top-level model that you are exporting.
Also, if you find that the FMU import takes an age to complete or just hangs, it might be because Simulink is trying to save a lot of information to a network drive as part of the import process. Try setting your current directory as a local drive. I nearly gave up on the entire FMU process before realising that this was causing the problem!

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by