- Index
- » Programming
- » Modelica Language
- » FMU to S-function
FMU to S-function
FMU to S-function
Hello everyone,
I’m working on a specific model exchange between OpenModelica and Matlab/Simulink. I already read something about FMI (FMU) on internet but I didn’t find any tutorial how to sole that task. Does anyone have some tips for this problem?
Thanks,
Lala
_________________________________________________________________________________
I suppose you are using OMEdit.
Create your model and then export it as an FMU. From the menu FMI->export FMU.
Adeel.
_________________________________________________________________________________
First of all, thanks for replaying.
I already found this function in OMEdit and that’s why I want to try my models in Matlab/Simulink. But the question is that do I have to change the C code (prepare it for S-function) or OMEdit and FMI standard does all work for me? I know that FMI generates C code and FMU but can Simulink (S-function) read this code or there is need to do some changes? It means, if I don’t have to do any changes, only need is just to call S-function (C code) in Matlab/Simulink and simulation is going to work.
Many thanks,
Lala
- Lala
- 32 Posts
Re: FMU to S-function
Hi,
I don't know of such functionality being available except in Dymola were you can export a model to an S-function (as far as i know).
Can Simulink import an FMI?
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: FMU to S-function
Dymola already has that function. I hoped so that OM can do the same but OM is an open-source and of course it is not that perfect like commercial versions. Only thing that I want to do is not to make universal model translator between OMEdit and Simulink, but to translate just a model that I made in OMEdit. Hope so that FMI can help me with this, because it generates some code that can be used in Simulink. I’m not an expert in Simulink (not in OM, too) and I’m thankful to anyone who can give me some tips or who has some experience with this.
Cheers,
Lala
- Lala
- 32 Posts
Re: FMU to S-function
There is an add-on for Matlab by Modelon. You can find it here: http://www.modelon.com/products/fmi-toolbox-for-matlab/. It is supposed to enable FMU importing into Simulink.
- Index
- » Programming
- » Modelica Language
- » FMU to S-function