Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Import of OM FMUs does not work in Simulink

Import of OM FMUs does not work in Simulink

Hi,

I created a FMU with OpenModelica. The I used two different toolboxes of Matlab for importing this FMU and i tested 32bit R2013b and 64bit R2015a. But I always get the same error:
Could not load shared library or
Could not load DLL

Any hint what might be wrong?

Greetings,
Michael

Re: Import of OM FMUs does not work in Simulink

What OpenModelica version did you used to create the FMUs?

Edited by: adrpo - May-24-16 10:53:26

Re: Import of OM FMUs does not work in Simulink

Thanks for the quick reply and sorry for the missing information.

I used version 1.9.3.

Re: Import of OM FMUs does not work in Simulink

1.9.3 is ancient current/smile
I suggest you use the latest nightly-build:
https://build.openmodelica.org/omc/buil … ly-builds/
or the 1.9.6 release:
https://build.openmodelica.org/omc/buil … ses/1.9.6/


Re: Import of OM FMUs does not work in Simulink

All right, I will try out the latest version :-).

Re: Import of OM FMUs does not work in Simulink

Unfortunately, the version update did not help. I still get the same error:


Error in 'test/filename' while executing C MEX S-function 'sfun_fmurun', (mdlStart), at time 0.0.

Unexpected Standard exception from MEX file.
What() is:Could not load shared library
..

Re: Import of OM FMUs does not work in Simulink

The 1.9.6 release is using the same GCC 4.4 as 1.9.3. I would suggest trying the nightly builds which have been upgraded to GCC 5.3.0.
I remember for a previous forum post that one of the GCC DLLs we bundle with the FMI gfortran has issues with MATLAB:
https://www.openmodelica.org/forum/defa … fmu-export
but that was for GCC version 4.4. It might work fine with GCC 5.3.

Re: Import of OM FMUs does not work in Simulink

Thanks once more for your answer. Looks like the nightly build is going to fix the problem. Unfortunately, I am not allowed to install nightly builds, so maybe I will just wait for the next version of OpenModelica.

Re: Import of OM FMUs does not work in Simulink

1.9.{4,5,6} is the next major release after 1.9.3, so you may want to try it as well.

Re: Import of OM FMUs does not work in Simulink

Thanks for your reply, I already tried version 1.9.6.

Every exported FMU is 32-bit, isn't it?

Edited by: Mike_the_Mechanic - May-31-16 09:44:44
There are 0 guests and 0 other users also viewing this topic
You are here: