1

I am using Dymola 2017 (Compiler is Visual Studio 2013/VisualC++ 2013 express Edition (12.0)).

I tried to export different MSL examples (e.g. Modelica.Electrical.Analog.Examples.CauerLowPassAnalog) as FMU (co-sim and Model exchange). I imported the FMU back in Dymola. When I try to simulate the FMU, I get always similar error messages: enter image description hereenter image description here

Here the FMU setting:

enter image description here

When I create an FMU of the example: Modelica.Electrical.Analog.Examples.CauerLowPassAnalog

The following files are created:

enter image description here

But when I open the file "LowPass.fmu" (as .zip file), there is just one file inside:

enter image description here

This is the first time the I work with the 2017 version - when I created a FMU with the 2016 version, there were always all files in the FMU.

Would be great, if someone could help me. Thank you!

Matias
  • 581
  • 1
  • 5
  • 16

2 Answers2

3

I was able to reproduce your error by importing and attempting to simulate an FMU while the current working directory was set within an existing Modelica package (i.e., a directory with the package.mo file).

To fix change your working directory to a folder without a package.mo file.

For example (cd c:/Documents/Dymola) and then import and run your FMU.

Hope that helps.

Below is my C:/Documents/Dymola folder once I create the FMU... Initial Folder Output

Everything can be deleted except the .fmu file and everything still works...

Only needed file

Scott G
  • 2,194
  • 1
  • 14
  • 24
  • Thank you very much for your comment. I tried your suggestions, but still get the same error messages. Do I need to install an additional package with Dymola 2017 to work with FMUs? I added now the setting for my FMU export/import in the question above (perhaps wrong settings?). Thank you very much for your help. – Matias May 26 '17 at 07:22
  • @Matias: I'm not sure what you may be doing wrong. As I remember I didn't do anything special for the Dymola installation. I also tried your exact settings and it worked for me... The only thing that messed it up was the directory that I mentioned above. – Scott G May 26 '17 at 13:01
  • @Matias: I'd say go ahead and reinstall Dymola and make sure to do the selection to install all the libraries options. Perhaps that is what is going on. – Scott G May 26 '17 at 13:10
  • Thank you very much - did you tick "Binaries" in the FMU settings? If you open the .fmu file (as .zip file), are there additional file compared to my .fmu? Thank you very much for your support! – Matias May 26 '17 at 14:06
  • @Matias: Good catch. If I have the 32/64 bit binaries option checked things work. If they are not checked then things don't work but I don't get the same error that you had posted in the original question. – Scott G May 26 '17 at 16:53
2

The meaning of the error message is that Dymola cannot find the extracted FMU library. It could be that your FMU is not properly extracted by Dymola.

I would first check the working directory (you can know that by typing cd in the Dymola command window), if the FMU is properly extracted there.

It might also help, if you change to a working directory close to the root (for exampe create a directory C:/tmp and cd to it), so that you don't run into problem with the path length limit in Windows.

  • Thank you very much for your comment. I tried you suggestions, but still get the same error message. Do I need to install an additional package with Dymola 2017 to work with FMUs? – Matias May 26 '17 at 07:10