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
  • Index
  • » Users
  • » burp00
  • » Profile

Posts

Posts

Hi,
I'm trying to get my controller created in Simlink to run in Dymola. I have never done this before and have only basic knowledge of Dymola and the Modelica language.

To start my adventure of fmu co-simulation I tried to insert a simple Simulink model. The model contains only a constant value block and an output port. Then I followed the description of https://ch.mathworks.com/help/simulink/ … g-fmu.html to generate the fmu. This worked as expected.

To insert the fmu in Dymola I followed the description of https://www.claytex.com/tech-blog/build … -simulink/ (2. Import FMU in Dymola). This also worked and I got an fmu block in Dymola.

After that, I wanted to start my test-fmu and clicked "translate" which runs without issues (no warnings, no errors).

Finally, I clicked "Simulate" which resulted in an error (shown in the Simulation info of the Dymola Messages):
---------------------------------------------------------------------------------------------------------------------------------------
Log-file of program ./dymosim
(generated: Fri Oct 11 14:53:37 2019)

dymosim started
... "dsin.txt" loading (dymosim input file)
Error: The following error was detected at time: 0
Loading of FMU dynamic link library (Fmo_test_01.dll) failed!
The stack of functions is:
Fmo_test_01_fmu.fmi_Functions.fmiModel
Fmo_test_01_fmu.fmi_Functions.fmiModel("Fmo_test_01_fmu", fmo_test_01_fmu.fmi_loggingOn, "file:///C:/windows/system32/Resources/Library/FMU/Fmo_test_01/resources", 0, 1)
Error: Integrator failed to start model.
---------------------------------------------------------------------------------------------------------------------------------------


I don't understand the problem and don't know how to solve it. The "Fmo_test_01.dll" is in the folder "C:\Windows\System32\Resources\Library\FMU\Fmo_test_01\binaries\win64". Therefore, changed the path (fmi_resourceLocation) mentioned in the error message to the .dll path which did not help.

I searched the internet and the closest I came to anything relatable was a thread in this forum: https://openmodelica.org/forum/default- … fmu-export . Unfortunately, this did not help.

Looking forward to suggestions form more experienced users!
Cheers
Philipp

  • Index
  • » Users
  • » burp00
  • » Profile
You are here: